2015-08-21 01:43:12 +08:00
|
|
|
<div class="embeddable-hosts">
|
|
|
|
{{#if embedding.embeddable_hosts}}
|
2018-07-03 11:14:53 +08:00
|
|
|
<table class="embedding grid">
|
|
|
|
<thead>
|
2017-05-06 06:08:18 +08:00
|
|
|
<th style="width: 25%">{{i18n "admin.embedding.host"}}</th>
|
|
|
|
<th style="width: 15%">{{i18n "admin.embedding.class_name"}}</th>
|
2020-07-27 08:23:54 +08:00
|
|
|
<th style="width: 25%">{{i18n "admin.embedding.allowed_paths"}}</th>
|
2017-05-06 06:08:18 +08:00
|
|
|
<th style="width: 25%">{{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>
|
2015-08-21 01:43:12 +08:00
|
|
|
{{#each embedding.embeddable_hosts as |host|}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{embeddable-host 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}}
|
|
|
|
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button label="admin.embedding.add_host" action=(action "addHost") icon="plus" class="btn-primary add-host"}}
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if showSecondary}}
|
|
|
|
<div class="embedding-secondary">
|
2020-03-12 23:50:20 +08:00
|
|
|
<p>{{html-safe (i18n "admin.embedding.sample")}}</p>
|
2015-08-21 01:43:12 +08:00
|
|
|
{{highlighted-code code=embeddingCode lang="html"}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<div class="embedding-secondary">
|
|
|
|
<h3>{{i18n "admin.embedding.settings"}}</h3>
|
|
|
|
|
|
|
|
{{embedding-setting field="embed_by_username" value=embedding.embed_by_username}}
|
|
|
|
{{embedding-setting field="embed_post_limit" value=embedding.embed_post_limit}}
|
2016-08-23 00:43:02 +08:00
|
|
|
{{embedding-setting field="embed_title_scrubber"
|
|
|
|
value=embedding.embed_title_scrubber
|
|
|
|
placeholder="- site.com$"}}
|
2015-08-21 01:43:12 +08:00
|
|
|
{{embedding-setting field="embed_truncate" value=embedding.embed_truncate type="checkbox"}}
|
2020-04-14 03:17:02 +08:00
|
|
|
{{embedding-setting field="embed_unlisted" value=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>
|
|
|
|
|
2020-07-27 08:23:54 +08:00
|
|
|
{{embedding-setting field="allowed_embed_selectors"
|
|
|
|
value=embedding.allowed_embed_selectors
|
2015-10-11 20:48:37 +08:00
|
|
|
placeholder="article, #story, .post"}}
|
2015-09-24 00:10:15 +08:00
|
|
|
|
2020-07-27 08:23:54 +08:00
|
|
|
{{embedding-setting field="blocked_embed_selectors"
|
|
|
|
value=embedding.blocked_embed_selectors
|
2015-10-11 20:48:37 +08:00
|
|
|
placeholder=".ad-unit, header"}}
|
2015-09-25 06:20:59 +08:00
|
|
|
|
2020-07-27 08:23:54 +08:00
|
|
|
{{embedding-setting field="allowed_embed_classnames"
|
|
|
|
value=embedding.allowed_embed_classnames
|
2015-09-25 06:20:59 +08:00
|
|
|
placeholder="emoji, classname"}}
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="embedding-secondary">
|
|
|
|
{{d-button label="admin.embedding.save"
|
2019-01-10 18:06:01 +08:00
|
|
|
action=(action "saveChanges")
|
2015-08-21 01:43:12 +08:00
|
|
|
class="btn-primary embed-save"
|
|
|
|
disabled=embedding.isSaving}}
|
|
|
|
|
|
|
|
{{#if saved}}{{i18n "saved"}}{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|