mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-09-20 09:57:29 +02:00
Add light and dark theme pair for the system appearance setting
This commit is contained in:
@@ -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())?;
|
||||
|
||||
Reference in New Issue
Block a user