mirror of
https://github.com/discourse/discourse.git
synced 2025-01-06 05:03:42 +08:00
533800a87b
This commit includes other various improvements to watched words. auto_silence_first_post_regex site setting was removed because it overlapped with 'require approval' watched words.
23 lines
458 B
JavaScript
23 lines
458 B
JavaScript
import Component from "@ember/component";
|
|
import I18n from "I18n";
|
|
import bootbox from "bootbox";
|
|
|
|
export default Component.extend({
|
|
classNames: ["watched-word"],
|
|
|
|
click() {
|
|
this.word
|
|
.destroy()
|
|
.then(() => {
|
|
this.action(this.word);
|
|
})
|
|
.catch((e) => {
|
|
bootbox.alert(
|
|
I18n.t("generic_error_with_reason", {
|
|
error: `http: ${e.status} - ${e.body}`,
|
|
})
|
|
);
|
|
});
|
|
},
|
|
});
|