mirror of
https://github.com/discourse/discourse.git
synced 2024-12-29 03:43:54 +08:00
82506096b7
This removes all trivial usages of the `{{action}}` keyword (the helper form, not the modifier form), where trivial means: 1. It's a co-located component (`.hbs` next to `.js`) 2. The JS file has a default export that is native class 3. `{{action "foo"}}` or `(action "foo")` with no extra arguments 4. There is a corresponding `foo()` method defined on the class (not inherited, etc) There are more usages that is slightly more involved (with arguments, etc) that we can deal with, but this PR seems big enough so I just included the easiest cases here. To aid review, each file is converted in an individual commit, and the matching method is temporary annotated with `@__action__` instead of the normal `@action`. This forces a git diff when it is already annotated as `@action`. * DEV: {{action}} -> @action admin-penalty-post-action.hbs * DEV: {{action}} -> @action admin-report.hbs * DEV: {{action}} -> @action admin-watched-word.hbs * DEV: {{action}} -> @action emoji-value-list.hbs * DEV: {{action}} -> @action bool.hbs * DEV: {{action}} -> @action category.hbs * DEV: {{action}} -> @action secret-value-list.hbs * DEV: {{action}} -> @action category-list.hbs * DEV: {{action}} -> @action color.hbs * DEV: {{action}} -> @action compact-list.hbs * DEV: {{action}} -> @action group-list.hbs * DEV: {{action}} -> @action host-list.hbs * DEV: {{action}} -> @action named-list.hbs * DEV: {{action}} -> @action simple-list.hbs * DEV: {{action}} -> @action tag-group-list.hbs * DEV: {{action}} -> @action tag-list.hbs * DEV: {{action}} -> @action value-list.hbs * DEV: {{action}} -> @action watched-word-form.hbs * DEV: {{action}} -> @action composer-messages.hbs * DEV: {{action}} -> @action section.hbs * DEV: {{action}} -> @action user-status-picker.hbs * DEV: cleanup @__action__ -> @action
20 lines
488 B
Handlebars
20 lines
488 B
Handlebars
<span
|
|
role="button"
|
|
onclick={{this.deleteWord}}
|
|
class="delete-word-record"
|
|
>{{d-icon "times"}}</span>
|
|
{{this.word.word}}
|
|
{{#if (or this.isReplace this.isLink)}}
|
|
→
|
|
<span class="replacement">{{this.word.replacement}}</span>
|
|
{{else if this.isTag}}
|
|
→
|
|
{{#each this.tags as |tag|}}
|
|
<span class="tag">{{tag}}</span>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{#if this.isCaseSensitive}}
|
|
<span class="case-sensitive">{{i18n
|
|
"admin.watched_words.case_sensitive"
|
|
}}</span>
|
|
{{/if}} |