chore: added dark mode and language settings to the navbar

This commit is contained in:
2025-09-27 21:51:59 +02:00
parent f54eada94d
commit 73c397a1bc
9 changed files with 322 additions and 102 deletions
+4 -8
View File
@@ -10,6 +10,7 @@
<div class="app-body">
<AppNavbar />
<main>
<RouterView />
</main>
@@ -92,18 +93,13 @@ export default defineComponent({
StorageManager.setStringValue(STORAGE_VERSION_KEY, this.appVersion);
},
changeLang(lang: string) {
this.$i18n.locale = lang;
this.store.currentAppLocale = lang;
StorageManager.setStringValue('lang', lang);
},
loadLang() {
const storageLang = StorageManager.getStringValue('lang');
if (storageLang) {
this.changeLang(storageLang);
this.store.changeLang(storageLang);
return;
}
@@ -112,7 +108,7 @@ export default defineComponent({
const naviLanguage = window.navigator.language.toString();
if (!naviLanguage.startsWith('pl')) {
this.changeLang('en');
this.store.changeLang('en');
}
}
}