修改计算规则

This commit is contained in:
2025-08-08 12:27:56 +08:00
parent f3324b1107
commit 5016c1d9d6
13 changed files with 1462 additions and 132 deletions

View File

@@ -58,7 +58,7 @@ const DEFAULT_CUSTOM_COLORS: CustomThemeColors = {
};
export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const [theme, setThemeState] = useState<ThemeMode>('dark');
const [theme, setThemeState] = useState<ThemeMode>('gray');
const [customColors, setCustomColorsState] = useState<CustomThemeColors>(DEFAULT_CUSTOM_COLORS);
const [isLoading, setIsLoading] = useState(true);
@@ -73,6 +73,9 @@ export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ childre
const themeMode = savedTheme as ThemeMode;
setThemeState(themeMode);
applyTheme(themeMode, customColors);
} else {
// Apply default theme if no saved preference
applyTheme('gray', customColors);
}
// Load custom colors