dark mode for model provider

This commit is contained in:
JzoNg
2024-12-18 15:18:56 +08:00
parent 5dad4793e6
commit 1fa5b1755f
22 changed files with 821 additions and 100 deletions

View File

@ -125,7 +125,7 @@ export const AppContextProvider: FC<AppContextProviderProps> = ({ children }) =>
setCurrentWorkspace(currentWorkspaceResponse)
}, [currentWorkspaceResponse])
const [theme, setTheme] = useState<Theme>(Theme.light)
const [theme, setTheme] = useState<Theme>(Theme.dark)
const handleSetTheme = useCallback((theme: Theme) => {
setTheme(theme)
globalThis.document.documentElement.setAttribute('data-theme', theme)