From c4ef4d429758f522fed1dbb89324dbbd03600279 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:27:26 +0700 Subject: [PATCH] calendar: move zoom slider to top-right horizontal control --- frontend/app.vue | 166 +++++++++++++++++++++-------------------------- 1 file changed, 73 insertions(+), 93 deletions(-) diff --git a/frontend/app.vue b/frontend/app.vue index a60e22b..775132e 100644 --- a/frontend/app.vue +++ b/frontend/app.vue @@ -2133,20 +2133,12 @@ const calendarZoomOverlay = ref<{ active: boolean } & CalendarRect>({ let calendarWheelLockUntil = 0; let calendarZoomOverlayTimer: ReturnType | null = null; const CALENDAR_ZOOM_DURATION_MS = 180; -const calendarZoomStops: Array<{ view: CalendarHierarchyView; label: string }> = [ - { view: "year", label: "Year" }, - { view: "month", label: "Month" }, - { view: "week", label: "Week" }, - { view: "day", label: "Day" }, -]; const calendarZoomOrder: CalendarHierarchyView[] = ["year", "month", "week", "day"]; const normalizedCalendarView = computed(() => calendarView.value === "agenda" ? "month" : calendarView.value, ); -const calendarZoomLevelIndex = computed(() => - Math.max(0, calendarZoomStops.findIndex((stop) => stop.view === normalizedCalendarView.value)), -); +const calendarZoomLevelIndex = computed(() => Math.max(0, calendarZoomOrder.indexOf(normalizedCalendarView.value))); const calendarZoomOverlayStyle = computed(() => ({ left: `${calendarZoomOverlay.value.left}px`, top: `${calendarZoomOverlay.value.top}px`, @@ -2401,8 +2393,7 @@ async function setCalendarZoomLevel(targetView: CalendarHierarchyView) { function onCalendarZoomSliderInput(event: Event) { const value = Number((event.target as HTMLInputElement | null)?.value ?? NaN); if (!Number.isFinite(value)) return; - const sliderStep = Math.max(0, Math.min(3, Math.round(value))); - const targetIndex = 3 - sliderStep; + const targetIndex = Math.max(0, Math.min(3, Math.round(value))); const targetView = calendarZoomOrder[targetIndex]; if (!targetView) return; void setCalendarZoomLevel(targetView); @@ -4252,7 +4243,7 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected") v-if="contextPickerEnabled" class="context-scope-label" >{{ contextScopeLabel('calendar') }} -
+
@@ -4261,6 +4252,26 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected") {{ calendarPeriodLabel }}
+
+ + +
-
- - -