discourse/app/assets/javascripts/admin/addon/templates/components/embeddable-host.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.7 KiB
Handlebars
Raw Normal View History

{{#if editing}}
2018-07-03 11:14:53 +08:00
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.host"}}</div>
<Input @value={{buffered.host}} placeholder="example.com" @enter={{action "save"}} class="host-name" @autofocus={{true}} />
</td>
2018-07-03 11:14:53 +08:00
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.class_name"}}</div>
<Input @value={{buffered.class_name}} placeholder="class" @enter={{action "save"}} class="class-name" />
</td>
2018-07-03 11:14:53 +08:00
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
<Input @value={{buffered.allowed_paths}} placeholder="/blog/.*" @enter={{action "save"}} class="path-allowlist" />
</td>
2018-07-03 11:14:53 +08:00
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.category"}}</div>
<CategoryChooser @value={{categoryId}} @class="small" @onChange={{action (mut categoryId)}} />
</td>
2018-07-03 11:14:53 +08:00
<td class="editing-controls">
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{cantSave}} />
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{host.isSaving}} />
</td>
{{else}}
2018-07-03 11:14:53 +08:00
<td><div class="label">{{i18n "admin.embedding.host"}}</div>{{host.host}}</td>
<td><div class="label">{{i18n "admin.embedding.class_name"}}</div>{{host.class_name}}</td>
<td><div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>{{host.allowed_paths}}</td>
<td><div class="label">{{i18n "admin.embedding.category"}}</div>{{category-badge host.category allowUncategorized=true}}</td>
2018-07-03 11:14:53 +08:00
<td class="controls">
<DButton @icon="pencil-alt" @action={{action "edit"}} />
<DButton @icon="far-trash-alt" @action={{action "delete"}} @class="btn-danger" />
</td>
{{/if}}