From afbfd6b66cf6ef76c7775462df374f18ba6e9528 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:41:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Fix=20the=20problem=20that=20the=20theme?= =?UTF-8?q?=20color=20display=20is=20abnormal=20after=20t=E2=80=A6=20(#833?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …he upgrade --- frontend/src/views/login/components/login-form.vue | 3 +-- frontend/src/views/setting/panel/index.vue | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/login/components/login-form.vue b/frontend/src/views/login/components/login-form.vue index a10121024..72908c656 100644 --- a/frontend/src/views/login/components/login-form.vue +++ b/frontend/src/views/login/components/login-form.vue @@ -413,8 +413,7 @@ const getSetting = async () => { i18n.warnHtmlMessage = false; globalStore.setOpenMenuTabs(res.data.menuTabs === 'Enable'); globalStore.updateLanguage(res.data.language); - let theme = globalStore.themeConfig.theme === res.data.theme ? res.data.theme : globalStore.themeConfig.theme; - globalStore.setThemeConfig({ ...themeConfig.value, theme: theme, panelName: res.data.panelName }); + globalStore.setThemeConfig({ ...themeConfig.value, theme: res.data.theme, panelName: res.data.panelName }); } catch (error) {} }; diff --git a/frontend/src/views/setting/panel/index.vue b/frontend/src/views/setting/panel/index.vue index 188082030..191c9058c 100644 --- a/frontend/src/views/setting/panel/index.vue +++ b/frontend/src/views/setting/panel/index.vue @@ -327,6 +327,7 @@ const search = async () => { form.apiKeyValidityTime = res.data.apiKeyValidityTime; form.hideMenu = res.data.hideMenu; form.systemIP = res.data.systemIP; + form.theme = res.data.theme; if (isMasterProductPro.value) { const xpackRes = await getXpackSetting(); @@ -340,7 +341,7 @@ const search = async () => { form.proxyDocker = xpackRes.data.proxyDocker; } } else { - form.theme = globalStore.themeConfig.theme || res.data.theme || 'light'; + globalStore.themeConfig.theme = form.theme; } };