π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:zap: Replace error with warning for failed user actions
Alicia Sykescdab7981bd3b
diff --git a/src/components/Configuration/CloudBackupRestore.vue b/src/components/Configuration/CloudBackupRestore.vueindex 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.vueindex 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 */