1616 Enable Auto-Save
1717 </b-switch >
1818 </div >
19+ <div class =" setting-row" >
20+ <b-switch v-model =" localWeekStartMonday" @update:modelValue =" onWeekStartMondayChange" >
21+ Start week on Monday
22+ </b-switch >
23+ <p class =" setting-hint" >
24+ Display the calendar with Monday as the first day of the week (European style).
25+ </p >
26+ </div >
1927 </div >
2028
2129 <div class =" settings-card" >
207215import { computed , getCurrentInstance , onMounted , ref } from ' vue' ;
208216import type { IExternalCalendar } from ' ../interfaces' ;
209217import { CalendarService } from ' ../services/calendars' ;
218+ import directionService , { type DirectionPreference } from ' ../services/direction' ;
210219import { Requests } from ' ../services/requests' ;
211220import type { BuefyInstance } from ' ../services/sharedBuefy' ;
212221import sidebar from ' ../services/sidebar' ;
213- import directionService , { type DirectionPreference } from ' ../services/direction' ;
214222import themeService , { type ThemePreference } from ' ../services/theme' ;
215223
216224const emit = defineEmits <{
@@ -226,6 +234,7 @@ const localTheme = ref<ThemePreference>('system');
226234const localDirection = ref <DirectionPreference >(' ltr' );
227235const localKanbanEnabled = ref (false );
228236const localKanbanColumns = ref <string []>([' todo' , ' done' ]);
237+ const localWeekStartMonday = ref (false );
229238
230239const themeOptions = [
231240 { value: ' light' , label: ' Light' , icon: ' fas fa-sun' },
@@ -257,6 +266,7 @@ onMounted(() => {
257266 localDirection .value = directionService .preference ;
258267 localKanbanEnabled .value = sidebar .kanbanEnabled ;
259268 localKanbanColumns .value = [... sidebar .kanbanColumns ];
269+ localWeekStartMonday .value = sidebar .weekStartMonday ;
260270
261271 fetchCalendarUrl ();
262272 fetchExternalCalendars ();
@@ -274,6 +284,18 @@ const onAutoSaveChange = (value: boolean) => {
274284 });
275285};
276286
287+ const onWeekStartMondayChange = (value : boolean ) => {
288+ // Update the setting immediately
289+ sidebar .toggleWeekStartMonday (value );
290+
291+ // Show success toast
292+ buefy ?.toast .open ({
293+ message: ` Week now starts on ${value ? ' Monday' : ' Sunday' } ` ,
294+ type: ' is-success' ,
295+ duration: 2000 ,
296+ });
297+ };
298+
277299const onVimModeChange = (value : boolean ) => {
278300 // Update the setting immediately
279301 sidebar .toggleVimMode (value );
0 commit comments