frontend: invert zoom direction and move week expand control
This commit is contained in:
@@ -1343,6 +1343,7 @@ function describeChangeEntity(entity: string) {
|
|||||||
if (entity === "calendar_event") return "Calendar event";
|
if (entity === "calendar_event") return "Calendar event";
|
||||||
if (entity === "message") return "Message";
|
if (entity === "message") return "Message";
|
||||||
if (entity === "deal") return "Deal";
|
if (entity === "deal") return "Deal";
|
||||||
|
if (entity === "workspace_document") return "Workspace document";
|
||||||
return entity || "Change";
|
return entity || "Change";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1777,6 +1778,14 @@ function applyReviewStepToUi(push = false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.entity === "workspace_document" && item.entityId) {
|
||||||
|
selectedTab.value = "documents";
|
||||||
|
selectedDocumentId.value = item.entityId;
|
||||||
|
focusedCalendarEventId.value = "";
|
||||||
|
syncPathFromUi(push);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
peopleLeftMode.value = "contacts";
|
peopleLeftMode.value = "contacts";
|
||||||
focusedCalendarEventId.value = "";
|
focusedCalendarEventId.value = "";
|
||||||
syncPathFromUi(push);
|
syncPathFromUi(push);
|
||||||
@@ -1911,26 +1920,26 @@ const calendarViewOptions: { value: CalendarView; label: string }[] = [
|
|||||||
|
|
||||||
const calendarZoomLevel = computed<number>({
|
const calendarZoomLevel = computed<number>({
|
||||||
get() {
|
get() {
|
||||||
if (calendarView.value === "day") return 1;
|
if (calendarView.value === "year") return 1;
|
||||||
if (calendarView.value === "week") return 2;
|
if (calendarView.value === "month" || calendarView.value === "agenda") return 2;
|
||||||
if (calendarView.value === "month" || calendarView.value === "agenda") return 3;
|
if (calendarView.value === "week") return 3;
|
||||||
return 4;
|
return 4;
|
||||||
},
|
},
|
||||||
set(next) {
|
set(next) {
|
||||||
const level = Math.max(1, Math.min(4, Number(next) || 3));
|
const level = Math.max(1, Math.min(4, Number(next) || 2));
|
||||||
if (level === 1) {
|
if (level === 1) {
|
||||||
calendarView.value = "day";
|
calendarView.value = "year";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (level === 2) {
|
if (level === 2) {
|
||||||
calendarView.value = "week";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (level === 3) {
|
|
||||||
calendarView.value = "month";
|
calendarView.value = "month";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
calendarView.value = "year";
|
if (level === 3) {
|
||||||
|
calendarView.value = "week";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
calendarView.value = "day";
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3716,13 +3725,12 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected")
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="calendar-hover-jump calendar-hover-jump-row"
|
class="calendar-hover-jump calendar-hover-jump-row"
|
||||||
title="Zoom to week"
|
title="Expand week vertically"
|
||||||
aria-label="Zoom to week"
|
aria-label="Expand week vertically"
|
||||||
@click.stop="openWeekView(row.startKey)"
|
@click.stop="openWeekView(row.startKey)"
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 20 20" class="h-3.5 w-3.5 fill-none stroke-current" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
<svg viewBox="0 0 20 20" class="h-3.5 w-3.5 fill-none stroke-current" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||||
<circle cx="8.5" cy="8.5" r="4.5" />
|
<path d="M10 2.5v15M6.2 6.4 10 2.5l3.8 3.9M6.2 13.6 10 17.5l3.8-3.9" />
|
||||||
<path d="M12 12l4.2 4.2" />
|
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="grid grid-cols-7 gap-1">
|
<div class="grid grid-cols-7 gap-1">
|
||||||
@@ -4980,6 +4988,18 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected")
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar-hover-jump-row {
|
||||||
|
top: 50%;
|
||||||
|
right: -14px;
|
||||||
|
transform: translate(6px, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.group:hover > .calendar-hover-jump-row,
|
||||||
|
.group:focus-within > .calendar-hover-jump-row,
|
||||||
|
.calendar-hover-jump-row:focus-visible {
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
.calendar-zoom-range {
|
.calendar-zoom-range {
|
||||||
--range-shdw: color-mix(in oklab, var(--color-primary) 72%, white 8%);
|
--range-shdw: color-mix(in oklab, var(--color-primary) 72%, white 8%);
|
||||||
--range-bg: color-mix(in oklab, var(--color-base-300) 85%, white 10%);
|
--range-bg: color-mix(in oklab, var(--color-base-300) 85%, white 10%);
|
||||||
|
|||||||
Reference in New Issue
Block a user