fix: Fix the problem that the theme color display is abnormal after t… (#8330)

…he upgrade
This commit is contained in:
ssongliu 2025-04-07 15:41:51 +08:00 committed by GitHub
parent 5cdc316293
commit afbfd6b66c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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) {}
};

View file

@ -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;
}
};