2015-08-19 05:15:46 +08:00
|
|
|
{{#if editing}}
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
2022-06-30 18:30:50 +08:00
|
|
|
<Input @value={{buffered.host}} placeholder="example.com" @enter={{action "save"}} class="host-name" @autofocus={{true}} />
|
2015-08-19 05:15:46 +08:00
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.class_name"}}</div>
|
2022-06-30 18:30:50 +08:00
|
|
|
<Input @value={{buffered.class_name}} placeholder="class" @enter={{action "save"}} class="class-name" />
|
2017-05-06 06:08:18 +08:00
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-input">
|
2020-07-27 08:23:54 +08:00
|
|
|
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
|
2022-06-30 18:30:50 +08:00
|
|
|
<Input @value={{buffered.allowed_paths}} placeholder="/blog/.*" @enter={{action "save"}} class="path-allowlist" />
|
2016-08-24 02:55:52 +08:00
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
2022-06-30 18:30:50 +08:00
|
|
|
<CategoryChooser @value={{categoryId}} @class="small" @onChange={{action (mut categoryId)}} />
|
2015-08-19 05:15:46 +08:00
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-controls">
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{cantSave}} />
|
|
|
|
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{host.isSaving}} />
|
2015-08-19 05:15:46 +08:00
|
|
|
</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>
|
2020-07-27 08:23:54 +08:00
|
|
|
<td><div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>{{host.allowed_paths}}</td>
|
2021-10-06 00:59:27 +08:00
|
|
|
<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">
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton @icon="pencil-alt" @action={{action "edit"}} />
|
|
|
|
<DButton @icon="far-trash-alt" @action={{action "delete"}} @class="btn-danger" />
|
2015-08-19 05:15:46 +08:00
|
|
|
</td>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{/if}}
|