From cdab7981bd3bbb36e39b980d601830742d3dae67 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 19 Sep 2021 21:29:39 +0100 Subject: [PATCH] :zap: Replace error with warning for failed user actions --- src/components/Configuration/CloudBackupRestore.vue | 4 ++-- src/views/Login.vue | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Configuration/CloudBackupRestore.vue b/src/components/Configuration/CloudBackupRestore.vue index 83b303f4..e4a4139c 100644 --- a/src/components/Configuration/CloudBackupRestore.vue +++ b/src/components/Configuration/CloudBackupRestore.vue @@ -66,7 +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'; +import { InfoHandler, WarningInfoHandler } from '@/utils/ErrorHandler'; export default { name: 'CloudBackupRestore', @@ -161,7 +161,7 @@ export default { this.backupPassword = ''; }, showErrorMsg(errorMsg) { - ErrorHandler(errorMsg); + WarningInfoHandler(errorMsg, 'Cloud Backup'); this.$toasted.show(errorMsg, { className: 'toast-error' }); }, showSuccessMsg(msg) { diff --git a/src/views/Login.vue b/src/views/Login.vue index 0b159f2c..27030208 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -76,7 +76,7 @@ import router from '@/router'; import Button from '@/components/FormElements/Button'; import Input from '@/components/FormElements/Input'; import Defaults, { localStorageKeys } from '@/utils/defaults'; -import { InfoHandler } from '@/utils/ErrorHandler'; +import { InfoHandler, WarningInfoHandler } from '@/utils/ErrorHandler'; import { checkCredentials, login, @@ -160,7 +160,7 @@ export default { this.goHome(); InfoHandler(`Succesfully signed in as ${this.username}`, 'Authentication'); } 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 */ @@ -168,9 +168,11 @@ export default { const isAllowed = this.isGuestAccessEnabled; if (isAllowed) { this.$toasted.show('Logged in as Guest, Redirecting...', { className: 'toast-success' }); + InfoHandler('Logged in as Guest', 'Authentication'); this.goHome(); } 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 */