From eea4cf68adcd8120e7f1724d554364b4bdae8742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=98=AD?= <81747598+lan-yonghui@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:24:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=B8=E5=8F=AF?= =?UTF-8?q?=E8=AF=81=E5=A4=B1=E6=95=88=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=20(#7075)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/license-import/index.vue | 1 + frontend/src/views/setting/panel/index.vue | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/license-import/index.vue b/frontend/src/components/license-import/index.vue index 3786055fd..7c0d40be4 100644 --- a/frontend/src/components/license-import/index.vue +++ b/frontend/src/components/license-import/index.vue @@ -90,6 +90,7 @@ const submit = async () => { globalStore.isProductPro = true; const xpackRes = await getXpackSetting(); if (xpackRes) { + globalStore.themeConfig.theme = xpackRes.data.theme; globalStore.themeConfig.themeColor = xpackRes.data.themeColor; } loading.value = false; diff --git a/frontend/src/views/setting/panel/index.vue b/frontend/src/views/setting/panel/index.vue index da4ea2abf..f1aee4fb2 100644 --- a/frontend/src/views/setting/panel/index.vue +++ b/frontend/src/views/setting/panel/index.vue @@ -300,14 +300,14 @@ const search = async () => { if (isProductPro.value) { const xpackRes = await getXpackSetting(); if (xpackRes) { - form.theme = xpackRes.data.theme || globalStore.themeConfig.theme; + form.theme = xpackRes.data.theme || globalStore.themeConfig.theme || 'light'; form.themeColor = JSON.parse(xpackRes.data.themeColor); globalStore.themeConfig.themeColor = xpackRes.data.themeColor; globalStore.themeConfig.theme = form.theme; form.proxyDocker = xpackRes.data.proxyDocker; } } else { - form.theme = res.data.theme; + form.theme = globalStore.themeConfig.theme || res.data.theme || 'light'; } }; @@ -395,10 +395,6 @@ const onSave = async (key: string, val: any) => { } globalStore.themeConfig.primary = color; setPrimaryColor(color); - MsgSuccess(i18n.t('commons.msg.operationSuccess')); - loading.value = false; - await search(); - return; } } if (key === 'MenuTabs') {