2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.editing}}
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
2022-07-06 16:37:54 +08:00
|
|
|
<Input
|
|
|
|
@value={{this.buffered.host}}
|
|
|
|
placeholder="example.com"
|
2023-11-13 20:29:20 +08:00
|
|
|
@enter={{this.save}}
|
2022-07-06 16:37:54 +08:00
|
|
|
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">
|
2020-07-27 08:23:54 +08:00
|
|
|
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<Input
|
|
|
|
@value={{this.buffered.allowed_paths}}
|
|
|
|
placeholder="/blog/.*"
|
2023-11-13 20:29:20 +08:00
|
|
|
@enter={{this.save}}
|
2022-07-06 01:41:31 +08:00
|
|
|
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-07-06 01:41:31 +08:00
|
|
|
<CategoryChooser
|
2024-03-29 00:16:39 +08:00
|
|
|
@value={{this.category.id}}
|
|
|
|
@onChangeCategory={{fn (mut this.category)}}
|
2023-12-12 20:09:05 +08:00
|
|
|
class="small"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2015-08-19 05:15:46 +08:00
|
|
|
</td>
|
2024-05-17 03:47:01 +08:00
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.tags"}}</div>
|
|
|
|
<TagChooser
|
|
|
|
@tags={{this.tags}}
|
|
|
|
@everyTag={{true}}
|
|
|
|
@excludeSynonyms={{true}}
|
|
|
|
@unlimitedTagCount={{true}}
|
|
|
|
@onChange={{fn (mut this.tags)}}
|
|
|
|
@options={{hash filterPlaceholder="category.tags_placeholder"}}
|
|
|
|
/>
|
|
|
|
</td>
|
|
|
|
<td class="editing-input">
|
|
|
|
<div class="label">{{i18n "admin.embedding.user"}}</div>
|
|
|
|
<UserChooser
|
|
|
|
@value={{this.user}}
|
|
|
|
@onChange={{action "onUserChange"}}
|
|
|
|
@options={{hash maximum=1 excludeCurrentUser=false}}
|
|
|
|
/>
|
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="editing-controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
|
|
|
@icon="check"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.save}}
|
2022-07-06 01:41:31 +08:00
|
|
|
@disabled={{this.cantSave}}
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-primary"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
|
|
|
<DButton
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="xmark"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.cancel}}
|
2022-07-06 01:41:31 +08:00
|
|
|
@disabled={{this.host.isSaving}}
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2015-08-19 05:15:46 +08:00
|
|
|
</td>
|
|
|
|
{{else}}
|
2022-12-28 20:23:09 +08:00
|
|
|
<td>
|
|
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
|
|
|
{{this.host.host}}
|
|
|
|
</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>
|
2024-03-27 00:16:07 +08:00
|
|
|
{{category-badge this.category allowUncategorized=true}}
|
2022-12-28 20:23:09 +08:00
|
|
|
</td>
|
2024-05-17 03:47:01 +08:00
|
|
|
<td>
|
|
|
|
{{this.tags}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{this.user}}
|
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="controls">
|
2024-09-13 23:50:52 +08:00
|
|
|
<DButton @icon="pencil" @action={{this.edit}} />
|
|
|
|
<DButton @icon="trash-can" @action={{this.delete}} class="btn-danger" />
|
2015-08-19 05:15:46 +08:00
|
|
|
</td>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{/if}}
|