Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:lipstick: Nicer design for language swtitcher

Alicia Sykes412d341b23db
diff --git a/src/components/Settings/LanguageSwitcher.vue b/src/components/Settings/LanguageSwitcher.vue
index e14e3238..59baa38e 100644
--- a/src/components/Settings/LanguageSwitcher.vue
+++ b/src/components/Settings/LanguageSwitcher.vue
@@ -26,8 +26,9 @@
<script>
import Button from '@/components/FormElements/Button';
-import { languages } from '@/utils/languages';
import SaveConfigIcon from '@/assets/interface-icons/save-config.svg';
+import ErrorHandler from '@/utils/ErrorHandler';
+import { languages } from '@/utils/languages';
import { localStorageKeys, modalNames } from '@/utils/defaults';
export default {
@@ -62,6 +63,8 @@ export default {
applyLanguageLocally() {
if (this.language && this.language.code) {
this.$i18n.locale = this.language.code;
+ } else {
+ ErrorHandler('Error applying language, it\'s config may be missing of incomplete');
}
},
/* Save language to local storage, show success msg and close modal */
@@ -76,6 +79,7 @@ export default {
this.$modal.hide(this.modalName);
} else {
this.$toasted.show('Unable to update language', { className: 'toast-error' });
+ ErrorHandler('Unable to apply language');
}
},
/* Gets the users current language from local storage */