From ebe8179c9eaacda11c72a7216dd47ee62bcd7793 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 3 Mar 2024 11:23:30 +0000 Subject: [PATCH] save and restore UI language together with other prefs - fixes #443 --- .../frontend/src/pages/settings/preferences-backups.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index f180e0b72c..07f5b05a60 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -139,6 +139,7 @@ type Profile = { hot: Record; cold: Record; fontSize: string | null; + lang: string | null; cornerRadius: string | null; useSystemFont: 't' | null; wallpaper: string | null; @@ -197,6 +198,7 @@ function getSettings(): Profile['settings'] { hot, cold, fontSize: miLocalStorage.getItem('fontSize'), + lang: miLocalStorage.getItem('lang'), cornerRadius: miLocalStorage.getItem('cornerRadius'), useSystemFont: miLocalStorage.getItem('useSystemFont') as 't' | null, wallpaper: miLocalStorage.getItem('wallpaper'), @@ -312,6 +314,13 @@ async function applyProfile(id: string): Promise { miLocalStorage.removeItem('fontSize'); } + // lang + if (settings.lang) { + miLocalStorage.setItem('lang', settings.lang); + } else { + miLocalStorage.removeItem('lang'); + } + // cornerRadius if (settings.cornerRadius) { miLocalStorage.setItem('cornerRadius', settings.cornerRadius);