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') {