mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
Add 'Start week on' setting (Monday default / Sunday) for daily and tasks calendars
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user