mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
v1.1.6 - Multi-window, single-instance file handling, line height setting
This commit is contained in:
@@ -45,6 +45,12 @@ pub fn get_app_config(state: State<'_, AppState>) -> Result<AppConfig, String> {
|
||||
Ok(config.clone())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_pending_open_file(state: State<'_, AppState>) -> Result<Option<String>, String> {
|
||||
let mut pending = state.pending_open_file.lock().map_err(|e| e.to_string())?;
|
||||
Ok(pending.take())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn set_theme(state: State<'_, AppState>, theme: String) -> Result<(), String> {
|
||||
let mut config = state.config.lock().map_err(|e| e.to_string())?;
|
||||
@@ -77,6 +83,14 @@ pub fn set_font_family(state: State<'_, AppState>, family: String) -> Result<(),
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn set_line_height(state: State<'_, AppState>, height: f64) -> Result<(), String> {
|
||||
let mut config = state.config.lock().map_err(|e| e.to_string())?;
|
||||
config.line_height = Some(height);
|
||||
save_app_config(&config)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// ── Notebooks ──
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
Reference in New Issue
Block a user