Add light and dark theme pair for the system appearance setting

This commit is contained in:
Hadrian Chio
2026-08-05 09:24:06 +02:00
parent 2dd0985ea9
commit e61c66dc26
12 changed files with 183 additions and 36 deletions
+9
View File
@@ -331,6 +331,15 @@ pub fn set_theme(state: State<'_, AppState>, theme: String) -> Result<(), String
Ok(())
}
#[tauri::command]
pub fn set_system_themes(state: State<'_, AppState>, light: String, dark: String) -> Result<(), String> {
let mut config = state.config.lock().map_err(|e| e.to_string())?;
config.system_light_theme = light;
config.system_dark_theme = dark;
save_app_config(&config)?;
Ok(())
}
#[tauri::command]
pub fn set_accent_color(state: State<'_, AppState>, color: String) -> Result<(), String> {
let mut config = state.config.lock().map_err(|e| e.to_string())?;