File tree 1 file changed +10
-1
lines changed
src/layout/GlobalProvider
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ import Link from 'next/link';
14
14
import { ReactNode , memo , useEffect } from 'react' ;
15
15
16
16
import AntdStaticMethods from '@/components/AntdStaticMethods' ;
17
- import { LOBE_THEME_NEUTRAL_COLOR , LOBE_THEME_PRIMARY_COLOR } from '@/const/theme' ;
17
+ import {
18
+ LOBE_THEME_APPEARANCE ,
19
+ LOBE_THEME_NEUTRAL_COLOR ,
20
+ LOBE_THEME_PRIMARY_COLOR ,
21
+ } from '@/const/theme' ;
18
22
import { useGlobalStore } from '@/store/global' ;
19
23
import { systemStatusSelectors } from '@/store/global/selectors' ;
20
24
import { useUserStore } from '@/store/user' ;
@@ -125,6 +129,11 @@ const AppTheme = memo<AppThemeProps>(
125
129
primaryColor : primaryColor ?? defaultPrimaryColor ,
126
130
} }
127
131
defaultAppearance = { defaultAppearance }
132
+ onAppearanceChange = { ( appearance ) => {
133
+ if ( themeMode !== 'auto' ) return ;
134
+
135
+ setCookie ( LOBE_THEME_APPEARANCE , appearance ) ;
136
+ } }
128
137
theme = { {
129
138
cssVar : true ,
130
139
token : {
You can’t perform that action at this time.
0 commit comments