Add 'Start week on' setting (Monday default / Sunday) for daily and tasks calendars

This commit is contained in:
Yuri Karamian
2026-06-08 20:56:28 +02:00
parent 5defddb35c
commit 92e8422cb0
7 changed files with 35 additions and 9 deletions
+2
View File
@@ -1067,6 +1067,7 @@ pub fn set_general_settings(
state: State<'_, AppState>,
compact_notes: bool,
time_format: String,
week_start: String,
gpu_acceleration: bool,
autostart: bool,
pdf_preview: bool,
@@ -1086,6 +1087,7 @@ pub fn set_general_settings(
config.show_note_dates = show_note_dates;
config.restore_last_session = restore_last_session;
config.time_format = time_format;
config.week_start = week_start;
config.gpu_acceleration = gpu_acceleration;
config.autostart = autostart;
config.pdf_preview = pdf_preview;
+7
View File
@@ -77,6 +77,8 @@ pub struct AppConfig {
pub show_note_dates: bool,
#[serde(default)]
pub time_format: String,
#[serde(default = "default_week_start")]
pub week_start: String,
#[serde(default)]
pub gpu_acceleration: bool,
#[serde(default)]
@@ -172,6 +174,10 @@ fn default_title_mode() -> String {
"input".to_string()
}
fn default_week_start() -> String {
"monday".to_string()
}
fn default_max_versions() -> u32 {
20
}
@@ -194,6 +200,7 @@ impl Default for AppConfig {
compact_notes: false,
show_note_dates: true,
time_format: "relative".to_string(),
week_start: "monday".to_string(),
gpu_acceleration: true,
autostart: false,
pdf_preview: false,