2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.editing}}
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
2022-07-06 04:37:54 -04:00
|
|
|
<Input
|
|
|
|
@value={{this.buffered.host}}
|
|
|
|
placeholder="example.com"
|
|
|
|
@enter={{action "save"}}
|
|
|
|
class="host-name"
|
|
|
|
autofocus={{true}}
|
|
|
|
/>
|
2015-08-18 17:15:46 -04:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.class_name"}}</div>
|
2022-07-05 13:41:31 -04:00
|
|
|
<Input
|
|
|
|
@value={{this.buffered.class_name}}
|
|
|
|
placeholder="class"
|
|
|
|
@enter={{action "save"}}
|
|
|
|
class="class-name"
|
|
|
|
/>
|
2017-05-05 18:08:18 -04:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="editing-input">
|
2020-07-26 20:23:54 -04:00
|
|
|
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
|
2022-07-05 13:41:31 -04:00
|
|
|
<Input
|
|
|
|
@value={{this.buffered.allowed_paths}}
|
|
|
|
placeholder="/blog/.*"
|
|
|
|
@enter={{action "save"}}
|
|
|
|
class="path-allowlist"
|
|
|
|
/>
|
2016-08-23 14:55:52 -04:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
2022-07-05 13:41:31 -04:00
|
|
|
<CategoryChooser
|
|
|
|
@value={{this.categoryId}}
|
|
|
|
@class="small"
|
|
|
|
@onChange={{action (mut this.categoryId)}}
|
|
|
|
/>
|
2015-08-18 17:15:46 -04:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="editing-controls">
|
2022-07-05 13:41:31 -04:00
|
|
|
<DButton
|
|
|
|
@icon="check"
|
|
|
|
@action={{action "save"}}
|
|
|
|
@class="btn-primary"
|
|
|
|
@disabled={{this.cantSave}}
|
|
|
|
/>
|
|
|
|
<DButton
|
|
|
|
@icon="times"
|
|
|
|
@action={{action "cancel"}}
|
|
|
|
@class="btn-danger"
|
|
|
|
@disabled={{this.host.isSaving}}
|
|
|
|
/>
|
2015-08-18 17:15:46 -04:00
|
|
|
</td>
|
|
|
|
{{else}}
|
2022-12-28 07:23:09 -05:00
|
|
|
<td>
|
|
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
|
|
|
{{this.host.host}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="label">
|
|
|
|
{{i18n "admin.embedding.class_name"}}
|
|
|
|
</div>
|
|
|
|
{{this.host.class_name}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="label">
|
|
|
|
{{i18n "admin.embedding.allowed_paths"}}
|
|
|
|
</div>
|
|
|
|
{{this.host.allowed_paths}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
|
|
|
{{category-badge this.host.category allowUncategorized=true}}
|
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="controls">
|
2022-06-30 06:30:50 -04:00
|
|
|
<DButton @icon="pencil-alt" @action={{action "edit"}} />
|
|
|
|
<DButton
|
|
|
|
@icon="far-trash-alt"
|
|
|
|
@action={{action "delete"}}
|
|
|
|
@class="btn-danger"
|
|
|
|
/>
|
2015-08-18 17:15:46 -04:00
|
|
|
</td>
|
2019-01-10 05:06:01 -05:00
|
|
|
{{/if}}
|