Improved handling of unexpected events

This commit is contained in:
Alicia Sykes
2021-09-12 16:33:29 +01:00
parent affff262d3
commit e9aa2bb7fc
5 changed files with 16 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ import IconBackup from '@/assets/interface-icons/config-backup.svg';
import IconRestore from '@/assets/interface-icons/config-restore.svg';
import { backup, update, restore } from '@/utils/CloudBackup';
import { localStorageKeys } from '@/utils/defaults';
import ErrorHandler, { InfoHandler } from '@/utils/ErrorHandler';
export default {
name: 'CloudBackupRestore',
@@ -160,9 +161,11 @@ export default {
this.backupPassword = '';
},
showErrorMsg(errorMsg) {
ErrorHandler(errorMsg);
this.$toasted.show(errorMsg, { className: 'toast-error' });
},
showSuccessMsg(msg) {
InfoHandler(msg, 'Cloud Backup');
this.$toasted.show(msg, { className: 'toast-success' });
},
makeHash(pass) {