diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 660fcec..e0d5039 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -1102,11 +1102,21 @@ pub fn set_general_settings( enable_wiki_links: bool, show_note_dates: bool, restore_last_session: bool, + show_all_notes: bool, + show_quick_access: bool, + show_tasks: bool, + show_daily_notes: bool, + show_trash: bool, ) -> Result<(), String> { let mut config = state.config.lock().map_err(|e| e.to_string())?; config.compact_notes = compact_notes; config.show_note_dates = show_note_dates; config.restore_last_session = restore_last_session; + config.show_all_notes = show_all_notes; + config.show_quick_access = show_quick_access; + config.show_tasks = show_tasks; + config.show_daily_notes = show_daily_notes; + config.show_trash = show_trash; config.time_format = time_format; config.week_start = week_start; config.daily_title_format = daily_title_format; diff --git a/src-tauri/src/types.rs b/src-tauri/src/types.rs index c3b4331..ac0f8f2 100644 --- a/src-tauri/src/types.rs +++ b/src-tauri/src/types.rs @@ -99,6 +99,16 @@ pub struct AppConfig { pub show_line_numbers: bool, #[serde(default = "default_true")] pub show_link_arrows: bool, + #[serde(default = "default_true")] + pub show_all_notes: bool, + #[serde(default = "default_true")] + pub show_quick_access: bool, + #[serde(default = "default_true")] + pub show_tasks: bool, + #[serde(default = "default_true")] + pub show_daily_notes: bool, + #[serde(default = "default_true")] + pub show_trash: bool, #[serde(default)] pub backup_enabled: bool, #[serde(default = "default_backup_frequency")] @@ -221,6 +231,11 @@ impl Default for AppConfig { hide_title_in_body: false, show_line_numbers: false, show_link_arrows: true, + show_all_notes: true, + show_quick_access: true, + show_tasks: true, + show_daily_notes: true, + show_trash: true, backup_enabled: false, backup_frequency: "24h".to_string(), backup_max_count: 10, diff --git a/src/lib/api.ts b/src/lib/api.ts index 01aad83..86677d4 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -239,6 +239,11 @@ export async function setGeneralSettings( enableWikiLinks: boolean, showNoteDates: boolean, restoreLastSession: boolean, + showAllNotes: boolean, + showQuickAccess: boolean, + showTasks: boolean, + showDailyNotes: boolean, + showTrash: boolean, ): Promise { return invoke("set_general_settings", { compactNotes, @@ -259,6 +264,11 @@ export async function setGeneralSettings( enableWikiLinks, showNoteDates, restoreLastSession, + showAllNotes, + showQuickAccess, + showTasks, + showDailyNotes, + showTrash, }); } diff --git a/src/lib/components/CommandPalette.svelte b/src/lib/components/CommandPalette.svelte index 204dee4..594012a 100644 --- a/src/lib/components/CommandPalette.svelte +++ b/src/lib/components/CommandPalette.svelte @@ -1,5 +1,5 @@