chore: reset the primary color after logout

This commit is contained in:
jialin
2025-11-21 16:56:23 +08:00
parent 3f63831488
commit ff67fba2c9
11 changed files with 49 additions and 23 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { colorPrimary } from '@/config/theme';
import { COLOR_PRIMARY } from '@/config/theme';
import { atom } from 'jotai';
import { atomWithStorage } from 'jotai/utils';
@@ -14,7 +14,7 @@ const defaultSettings: UserSettings = {
theme: 'light',
mode: 'auto',
isDarkTheme: false,
colorPrimary: colorPrimary,
colorPrimary: COLOR_PRIMARY,
collapsed: false
};
@@ -47,7 +47,7 @@ export const userSettingsHelperAtom = atom(
};
set(userSettingsAtom, {
...newSettings,
colorPrimary: newSettings.colorPrimary || colorPrimary,
colorPrimary: newSettings.colorPrimary || COLOR_PRIMARY,
isDarkTheme: newSettings.theme === 'realDark'
});
}