mirror of
https://github.com/documize/community.git
synced 2025-08-02 03:55:24 +02:00
Introduce new nofications framework
Integrated https://github.com/documize/iziToast and added 4 log levels.
This commit is contained in:
parent
f44cda66e6
commit
f05a6fc999
40 changed files with 4187 additions and 1031 deletions
|
@ -12,21 +12,37 @@
|
|||
import Mixin from '@ember/object/mixin';
|
||||
|
||||
export default Mixin.create({
|
||||
showNotification(msg) {
|
||||
this.eventBus.publish('notifyUser', msg);
|
||||
notifySuccess(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'success');
|
||||
},
|
||||
|
||||
showWait() {
|
||||
this.eventBus.publish('notifyUser', 'wait');
|
||||
notifyInfo(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'info');
|
||||
},
|
||||
|
||||
showDone() {
|
||||
this.eventBus.publish('notifyUser', 'done');
|
||||
notifyWarn(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'warn');
|
||||
},
|
||||
|
||||
notifyError(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'error');
|
||||
},
|
||||
|
||||
actions: {
|
||||
showNotification(msg) {
|
||||
this.eventBus.publish('notifyUser', msg);
|
||||
}
|
||||
notifySuccess(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'success');
|
||||
},
|
||||
|
||||
notifyInfo(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'info');
|
||||
},
|
||||
|
||||
notifyWarn(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'warn');
|
||||
},
|
||||
|
||||
notifyError(msg) {
|
||||
this.eventBus.publish('notifyUser', msg, 'error');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue