1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Introduce new nofications framework

Integrated https://github.com/documize/iziToast and added 4 log levels.
This commit is contained in:
sauls8t 2018-12-05 13:44:10 +00:00
parent f44cda66e6
commit f05a6fc999
40 changed files with 4187 additions and 1031 deletions

View file

@ -60,7 +60,6 @@ export default Component.extend(Notifier, Modal, {
},
doBackup() {
this.showWait();
this.set('backupFilename', '');
this.set('backupSuccess', false);
this.set('backupFailed', false);
@ -69,13 +68,13 @@ export default Component.extend(Notifier, Modal, {
let spec = this.get('backupSpec');
this.get('onBackup')(spec).then((filename) => {
this.showDone();
this.notifySuccess('Completed');
this.set('backupLabel', 'Start Backup');
this.set('backupSuccess', true);
this.set('backupFilename', filename);
this.set('backupRunning', false);
}, ()=> {
this.showDone();
this.notifyError('Failed');
this.set('backupLabel', 'Run Backup');
this.set('backupFailed', true);
this.set('backupRunning', false);
@ -134,7 +133,6 @@ export default Component.extend(Notifier, Modal, {
}
// start restore process
this.showWait();
this.set('restoreButtonLabel', 'Please wait, restore running...');
this.set('restoreSuccess', false);
this.set('restoreFailed', false);
@ -147,12 +145,12 @@ export default Component.extend(Notifier, Modal, {
}
this.get('onRestore')(spec, filedata).then(() => {
this.showDone();
this.notifySuccess('Completed');
this.set('backupLabel', 'Restore');
this.set('restoreSuccess', true);
this.get('router').transitionTo('auth.logout');
}, ()=> {
this.showDone();
this.notifyError('Failed');
this.set('restorbackupLabel', 'Restore');
this.set('restoreFailed', true);
});