0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 12:22:54 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-notice.js.es6

24 Zeilen
645 B
Text

2021-09-24 11:58:42 +02:00
import Component from "@ember/component";
2021-11-01 14:52:29 +01:00
import NoticeMessage from "../mixins/notice-message";
2021-09-24 11:58:42 +02:00
2021-11-01 14:52:29 +01:00
export default Component.extend(NoticeMessage, {
attributeBindings: ["notice.id:data-notice-id"],
classNameBindings: [':wizard-notice', 'notice.typeClass', 'notice.dismissed:dismissed', 'notice.expired:expired', 'notice.hidden:hidden'],
2021-09-24 11:58:42 +02:00
actions: {
dismiss() {
2021-10-19 14:49:06 +02:00
this.set("dismissing", true);
2021-09-24 11:58:42 +02:00
this.notice.dismiss().then(() => {
2021-10-19 14:49:06 +02:00
this.set("dismissing", false);
2021-09-24 11:58:42 +02:00
});
2021-10-19 14:49:06 +02:00
},
2021-11-01 14:52:29 +01:00
hide() {
this.set('hiding', true);
this.notice.hide().then(() => {
this.set('hiding', false);
});
},
}
2021-10-19 14:49:06 +02:00
});