discourse-chat-integration/assets/javascripts/admin/components/channel-details.js.es6

28 lines
625 B
Plaintext
Raw Normal View History

import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Component.extend({
classNames: ["channel-details"],
actions: {
deleteChannel(channel) {
bootbox.confirm(
I18n.t("chat_integration.channel_delete_confirm"),
I18n.t("no_value"),
I18n.t("yes_value"),
result => {
if (result) {
channel
.destroyRecord()
.then(() => this.refresh())
.catch(popupAjaxError);
}
}
);
},
editRule(rule) {
this.editRuleWithChannel(rule, this.get("channel"));
}
}
2017-10-03 05:42:07 -04:00
});