mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
fix: 修复许可证失效主题切换错误问题 (#7075)
This commit is contained in:
parent
3a400dd15a
commit
eea4cf68ad
@ -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;
|
||||
|
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user