mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 03:58:34 +08:00
eab560fe2a
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com> Co-authored-by: Robin Ward <robin.ward@gmail.com> Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
29 lines
738 B
JavaScript
29 lines
738 B
JavaScript
import I18n from "I18n";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
import { alias } from "@ember/object/computed";
|
|
import Component from "@ember/component";
|
|
import UploadMixin from "discourse/mixins/upload";
|
|
|
|
export default Component.extend(UploadMixin, {
|
|
type: "txt",
|
|
classNames: "watched-words-uploader",
|
|
uploadUrl: "/admin/logs/watched_words/upload",
|
|
addDisabled: alias("uploading"),
|
|
|
|
validateUploadedFilesOptions() {
|
|
return { skipValidation: true };
|
|
},
|
|
|
|
@discourseComputed("actionKey")
|
|
data(actionKey) {
|
|
return { action_key: actionKey };
|
|
},
|
|
|
|
uploadDone() {
|
|
if (this) {
|
|
bootbox.alert(I18n.t("admin.watched_words.form.upload_successful"));
|
|
this.done();
|
|
}
|
|
}
|
|
});
|