mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-30 04:21:42 +03:00
⚡ Replace error with warning for failed user actions
This commit is contained in:
parent
6e0cda8709
commit
cdab7981bd
@ -66,7 +66,7 @@ import IconBackup from '@/assets/interface-icons/config-backup.svg';
|
|||||||
import IconRestore from '@/assets/interface-icons/config-restore.svg';
|
import IconRestore from '@/assets/interface-icons/config-restore.svg';
|
||||||
import { backup, update, restore } from '@/utils/CloudBackup';
|
import { backup, update, restore } from '@/utils/CloudBackup';
|
||||||
import { localStorageKeys } from '@/utils/defaults';
|
import { localStorageKeys } from '@/utils/defaults';
|
||||||
import ErrorHandler, { InfoHandler } from '@/utils/ErrorHandler';
|
import { InfoHandler, WarningInfoHandler } from '@/utils/ErrorHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CloudBackupRestore',
|
name: 'CloudBackupRestore',
|
||||||
@ -161,7 +161,7 @@ export default {
|
|||||||
this.backupPassword = '';
|
this.backupPassword = '';
|
||||||
},
|
},
|
||||||
showErrorMsg(errorMsg) {
|
showErrorMsg(errorMsg) {
|
||||||
ErrorHandler(errorMsg);
|
WarningInfoHandler(errorMsg, 'Cloud Backup');
|
||||||
this.$toasted.show(errorMsg, { className: 'toast-error' });
|
this.$toasted.show(errorMsg, { className: 'toast-error' });
|
||||||
},
|
},
|
||||||
showSuccessMsg(msg) {
|
showSuccessMsg(msg) {
|
||||||
|
@ -76,7 +76,7 @@ import router from '@/router';
|
|||||||
import Button from '@/components/FormElements/Button';
|
import Button from '@/components/FormElements/Button';
|
||||||
import Input from '@/components/FormElements/Input';
|
import Input from '@/components/FormElements/Input';
|
||||||
import Defaults, { localStorageKeys } from '@/utils/defaults';
|
import Defaults, { localStorageKeys } from '@/utils/defaults';
|
||||||
import { InfoHandler } from '@/utils/ErrorHandler';
|
import { InfoHandler, WarningInfoHandler } from '@/utils/ErrorHandler';
|
||||||
import {
|
import {
|
||||||
checkCredentials,
|
checkCredentials,
|
||||||
login,
|
login,
|
||||||
@ -160,7 +160,7 @@ export default {
|
|||||||
this.goHome();
|
this.goHome();
|
||||||
InfoHandler(`Succesfully signed in as ${this.username}`, 'Authentication');
|
InfoHandler(`Succesfully signed in as ${this.username}`, 'Authentication');
|
||||||
} else {
|
} else {
|
||||||
InfoHandler(`Unable to Sign In - ${this.message}`, 'Authentication');
|
WarningInfoHandler('Unable to Sign In', 'Authentication', this.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* Calls function to double-check guest access enabled, then log in as guest */
|
/* Calls function to double-check guest access enabled, then log in as guest */
|
||||||
@ -168,9 +168,11 @@ export default {
|
|||||||
const isAllowed = this.isGuestAccessEnabled;
|
const isAllowed = this.isGuestAccessEnabled;
|
||||||
if (isAllowed) {
|
if (isAllowed) {
|
||||||
this.$toasted.show('Logged in as Guest, Redirecting...', { className: 'toast-success' });
|
this.$toasted.show('Logged in as Guest, Redirecting...', { className: 'toast-success' });
|
||||||
|
InfoHandler('Logged in as Guest', 'Authentication');
|
||||||
this.goHome();
|
this.goHome();
|
||||||
} else {
|
} else {
|
||||||
this.$toasted.show('Guest access not allowed', { className: 'toast-error' });
|
this.$toasted.show('Guest Access Not Allowed', { className: 'toast-error' });
|
||||||
|
WarningInfoHandler('Guest Access Not Allowed', 'Authentication');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* Calls logout, shows status message, and refreshed page */
|
/* Calls logout, shows status message, and refreshed page */
|
||||||
|
Loading…
Reference in New Issue
Block a user