Task attempt 6e204469-447f-4543-a0fd-1cd71cc49ee2 - Final changes

This commit is contained in:
Louis Knight-Webb
2025-06-27 21:22:50 +01:00
parent 2cf39a8a38
commit 0bb3d4e40a
3 changed files with 7 additions and 2 deletions

View File

@@ -25,6 +25,11 @@ pub enum ThemeMode {
Light,
Dark,
System,
Purple,
Green,
Blue,
Orange,
Red,
}
#[derive(Debug, Clone, Serialize, Deserialize, TS)]

View File

@@ -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)')

View File

@@ -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, };