discourse/app/assets/javascripts/admin/components/watched-word-uploader.js.es6

27 lines
667 B
Plaintext
Raw Normal View History

import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Component.extend(UploadMixin, {
type: "txt",
2018-06-15 11:03:24 -04:00
classNames: "watched-words-uploader",
uploadUrl: "/admin/logs/watched_words/upload",
2019-01-11 11:54:23 -05:00
addDisabled: Ember.computed.alias("uploading"),
validateUploadedFilesOptions() {
return { skipValidation: true };
},
2018-06-15 11:03:24 -04:00
@computed("actionKey")
data(actionKey) {
return { action_key: actionKey };
},
uploadDone() {
if (this) {
bootbox.alert(I18n.t("admin.watched_words.form.upload_successful"));
this.done();
}
}
});