Skip to content

Commit

Permalink
fix: 修复许可证失效主题切换错误问题 (#7075)
Browse files Browse the repository at this point in the history
  • Loading branch information
lan-yonghui authored Nov 15, 2024
1 parent 3a400dd commit eea4cf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/license-import/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/views/setting/panel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
};
Expand Down Expand Up @@ -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') {
Expand Down

0 comments on commit eea4cf6

Please sign in to comment.