mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
Add settings to hide unused sidebar items (#153)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user