29 lines
654 B
JavaScript
29 lines
654 B
JavaScript
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
import I18n from "I18n";
|
|
|
|
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"));
|
|
},
|
|
},
|
|
});
|