mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FEATURE: Support regular expressions for watched words
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import WatchedWord from 'admin/models/watched-word';
|
||||
import { on, observes } from 'ember-addons/ember-computed-decorators';
|
||||
import { default as computed, on, observes } from 'ember-addons/ember-computed-decorators';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
classNames: ['watched-word-form'],
|
||||
@ -7,6 +7,12 @@ export default Ember.Component.extend({
|
||||
actionKey: null,
|
||||
showSuccessMessage: false,
|
||||
|
||||
@computed('regularExpressions')
|
||||
placeholderKey(regularExpressions) {
|
||||
return "admin.watched_words.form.placeholder" +
|
||||
(regularExpressions ? "_regexp" : "");
|
||||
},
|
||||
|
||||
@observes('word')
|
||||
removeSuccessMessage() {
|
||||
if (this.get('showSuccessMessage') && !Ember.isEmpty(this.get('word'))) {
|
||||
|
Reference in New Issue
Block a user