2015-08-21 01:43:12 +08:00
|
|
|
<div class="embeddable-hosts">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.embedding.embeddable_hosts}}
|
2018-07-03 11:14:53 +08:00
|
|
|
<table class="embedding grid">
|
|
|
|
<thead>
|
2023-02-28 20:31:59 +08:00
|
|
|
<th style="width: 30%">{{i18n "admin.embedding.host"}}</th>
|
|
|
|
<th style="width: 30%">{{i18n "admin.embedding.allowed_paths"}}</th>
|
|
|
|
<th style="width: 30%">{{i18n "admin.embedding.category"}}</th>
|
2016-08-24 02:55:52 +08:00
|
|
|
<th style="width: 10%"> </th>
|
2018-07-03 11:14:53 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.embedding.embeddable_hosts as |host|}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<EmbeddableHost @host={{host}} @deleteHost={{action "deleteHost"}} />
|
2015-08-21 01:43:12 +08:00
|
|
|
{{/each}}
|
2018-07-03 11:14:53 +08:00
|
|
|
</tbody>
|
2015-08-21 01:43:12 +08:00
|
|
|
</table>
|
|
|
|
{{else}}
|
|
|
|
<p>{{i18n "admin.embedding.get_started"}}</p>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@label="admin.embedding.add_host"
|
|
|
|
@action={{action "addHost"}}
|
|
|
|
@icon="plus"
|
|
|
|
@class="btn-primary add-host"
|
|
|
|
/>
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.showSecondary}}
|
2015-08-21 01:43:12 +08:00
|
|
|
<div class="embedding-secondary">
|
2023-02-28 20:31:59 +08:00
|
|
|
{{html-safe (i18n "admin.embedding.sample")}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<HighlightedCode @code={{this.embeddingCode}} @lang="html" />
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<div class="embedding-secondary">
|
|
|
|
<h3>{{i18n "admin.embedding.settings"}}</h3>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<EmbeddingSetting
|
|
|
|
@field="embed_by_username"
|
|
|
|
@value={{this.embedding.embed_by_username}}
|
|
|
|
/>
|
|
|
|
<EmbeddingSetting
|
|
|
|
@field="embed_post_limit"
|
|
|
|
@value={{this.embedding.embed_post_limit}}
|
|
|
|
/>
|
|
|
|
<EmbeddingSetting
|
|
|
|
@field="embed_title_scrubber"
|
|
|
|
@value={{this.embedding.embed_title_scrubber}}
|
|
|
|
@placeholder="- site.com$"
|
|
|
|
/>
|
|
|
|
<EmbeddingSetting
|
|
|
|
@field="embed_truncate"
|
|
|
|
@value={{this.embedding.embed_truncate}}
|
|
|
|
@type="checkbox"
|
|
|
|
/>
|
|
|
|
<EmbeddingSetting
|
|
|
|
@field="embed_unlisted"
|
|
|
|
@value={{this.embedding.embed_unlisted}}
|
|
|
|
@type="checkbox"
|
|
|
|
/>
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
2015-08-19 05:15:46 +08:00
|
|
|
|
2015-08-21 01:43:12 +08:00
|
|
|
<div class="embedding-secondary">
|
|
|
|
<h3>{{i18n "admin.embedding.crawling_settings"}}</h3>
|
|
|
|
<p class="description">{{i18n "admin.embedding.crawling_description"}}</p>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<EmbeddingSetting
|
|
|
|
@field="allowed_embed_selectors"
|
|
|
|
@value={{this.embedding.allowed_embed_selectors}}
|
|
|
|
@placeholder="article, #story, .post"
|
|
|
|
/>
|
2015-09-24 00:10:15 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<EmbeddingSetting
|
|
|
|
@field="blocked_embed_selectors"
|
|
|
|
@value={{this.embedding.blocked_embed_selectors}}
|
|
|
|
@placeholder=".ad-unit, header"
|
|
|
|
/>
|
2015-09-25 06:20:59 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<EmbeddingSetting
|
|
|
|
@field="allowed_embed_classnames"
|
|
|
|
@value={{this.embedding.allowed_embed_classnames}}
|
|
|
|
@placeholder="emoji, classname"
|
|
|
|
/>
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="embedding-secondary">
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
|
|
|
@label="admin.embedding.save"
|
|
|
|
@action={{action "saveChanges"}}
|
|
|
|
@class="btn-primary embed-save"
|
|
|
|
@disabled={{this.embedding.isSaving}}
|
|
|
|
/>
|
2015-08-21 01:43:12 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.saved}}{{i18n "saved"}}{{/if}}
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|