2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.regexpError}}
|
|
|
|
<div class="alert alert-error">{{this.regexpError}}</div>
|
2021-05-28 00:42:43 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2021-03-09 17:52:12 +08:00
|
|
|
<div class="watched-word-controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
|
|
|
@href={{this.downloadLink}}
|
|
|
|
@icon="download"
|
|
|
|
@label="admin.watched_words.download"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default download-link"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2022-06-30 18:30:50 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<WatchedWordUploader
|
|
|
|
@id="watched-word-uploader"
|
|
|
|
@uploading={{this.uploading}}
|
|
|
|
@actionKey={{this.actionNameKey}}
|
|
|
|
@done={{action "uploadComplete"}}
|
|
|
|
/>
|
2022-06-30 18:30:50 +08:00
|
|
|
|
|
|
|
<DButton
|
|
|
|
@label="admin.watched_words.test.button_label"
|
|
|
|
@icon="far-eye"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.test}}
|
|
|
|
class="watched-word-test"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
|
|
|
|
|
|
|
<DButton
|
|
|
|
@label="admin.watched_words.clear_all"
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="trash-can"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.clearAll}}
|
|
|
|
class="btn-danger clear-all"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2018-07-03 11:14:53 +08:00
|
|
|
</div>
|
2019-07-22 19:59:56 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<p class="about">{{this.actionDescription}}</p>
|
2021-02-25 20:00:58 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.siteSettings.watched_words_regular_expressions}}
|
2021-06-25 17:08:52 +08:00
|
|
|
<p>{{html-safe
|
|
|
|
(i18n "admin.watched_words.regex_warning" basePath=(base-path))
|
|
|
|
}}</p>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<WatchedWordForm
|
|
|
|
@actionKey={{this.actionNameKey}}
|
|
|
|
@action={{action "recordAdded"}}
|
|
|
|
@filteredContent={{this.currentAction.words}}
|
|
|
|
/>
|
2021-02-25 20:00:58 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.currentAction.words}}
|
2018-02-27 05:35:43 +08:00
|
|
|
<label class="show-words-checkbox">
|
2022-07-06 16:37:54 +08:00
|
|
|
<Input
|
|
|
|
@type="checkbox"
|
|
|
|
@checked={{this.adminWatchedWords.showWords}}
|
|
|
|
disabled={{this.adminWatchedWords.disableShowWords}}
|
|
|
|
/>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{i18n
|
|
|
|
"admin.watched_words.show_words"
|
|
|
|
count=this.currentAction.words.length
|
|
|
|
}}
|
2018-02-27 05:35:43 +08:00
|
|
|
</label>
|
2021-02-25 20:00:58 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.showWordsList}}
|
|
|
|
<div class="watched-words-list watched-words-{{this.actionNameKey}}">
|
|
|
|
{{#each this.currentAction.words as |word|}}
|
2024-08-13 21:45:44 +08:00
|
|
|
<div class="watched-word-box">
|
|
|
|
<AdminWatchedWord
|
2022-07-06 01:41:31 +08:00
|
|
|
@actionKey={{this.actionNameKey}}
|
|
|
|
@word={{word}}
|
|
|
|
@action={{action "recordRemoved"}}
|
2024-08-13 21:45:44 +08:00
|
|
|
/>
|
|
|
|
</div>
|
2017-06-29 04:56:44 +08:00
|
|
|
{{/each}}
|
2021-02-25 20:00:58 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|