Task attempt 6e204469-447f-4543-a0fd-1cd71cc49ee2 - Final changes
This commit is contained in:
@@ -25,6 +25,11 @@ pub enum ThemeMode {
|
||||
Light,
|
||||
Dark,
|
||||
System,
|
||||
Purple,
|
||||
Green,
|
||||
Blue,
|
||||
Orange,
|
||||
Red,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, TS)]
|
||||
|
||||
@@ -33,7 +33,7 @@ export function ThemeProvider({
|
||||
useEffect(() => {
|
||||
const root = window.document.documentElement;
|
||||
|
||||
root.classList.remove('light', 'dark');
|
||||
root.classList.remove('light', 'dark', 'purple', 'green', 'blue', 'orange', 'red');
|
||||
|
||||
if (theme === 'system') {
|
||||
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)')
|
||||
|
||||
@@ -6,7 +6,7 @@ export type ApiResponse<T> = { success: boolean, data: T | null, message: string
|
||||
|
||||
export type Config = { theme: ThemeMode, executor: ExecutorConfig, disclaimer_acknowledged: boolean, onboarding_acknowledged: boolean, sound_alerts: boolean, sound_file: SoundFile, push_notifications: boolean, editor: EditorConfig, };
|
||||
|
||||
export type ThemeMode = "light" | "dark" | "system";
|
||||
export type ThemeMode = "light" | "dark" | "system" | "purple" | "green" | "blue" | "orange" | "red";
|
||||
|
||||
export type EditorConfig = { editor_type: EditorType, custom_command: string | null, };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user