From 90b1db0432ff920ffb6a7ac54352d32be52ca6b2 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 10 Oct 2026 22:34:35 +0200 Subject: [PATCH] feat(calendar): fold calendar lists and show options on hover in the sidebar The calendar list in the sidebar now works like Google Calendar's: - "My calendars" and a new "Other calendars" section (shared calendars, still grouped by owner) fold away, and stay folded - each calendar has a checkbox filled in its colour with a check mark - hovering a calendar shows an options button that opens the same menu as a right-click In the mini month, today is the filled circle and the selected day is tinted, so the two no longer look alike. --- .../calendar/calendar-sidebar-panel.tsx | 132 +++++++++++++----- components/calendar/mini-calendar.tsx | 11 +- locales/ar/common.json | 4 +- locales/ca/common.json | 4 +- locales/cs/common.json | 4 +- locales/da/common.json | 4 +- locales/de/common.json | 4 +- locales/en/common.json | 4 +- locales/es/common.json | 4 +- locales/fa/common.json | 4 +- locales/fr/common.json | 4 +- locales/he/common.json | 4 +- locales/hu/common.json | 4 +- locales/it/common.json | 4 +- locales/ja/common.json | 4 +- locales/ko/common.json | 4 +- locales/lv/common.json | 4 +- locales/mn/common.json | 4 +- locales/nb/common.json | 4 +- locales/nl/common.json | 4 +- locales/pl/common.json | 4 +- locales/pt/common.json | 4 +- locales/ro/common.json | 4 +- locales/ru/common.json | 4 +- locales/sk/common.json | 4 +- locales/tr/common.json | 4 +- locales/uk/common.json | 4 +- locales/zh-TW/common.json | 4 +- locales/zh/common.json | 4 +- 29 files changed, 184 insertions(+), 67 deletions(-) diff --git a/components/calendar/calendar-sidebar-panel.tsx b/components/calendar/calendar-sidebar-panel.tsx index 3ad161ce0..37b6f6abc 100644 --- a/components/calendar/calendar-sidebar-panel.tsx +++ b/components/calendar/calendar-sidebar-panel.tsx @@ -2,7 +2,7 @@ import { useMemo, useState } from "react"; import { useTranslations } from "next-intl"; -import { ChevronDown, ChevronRight, Globe, ListTodo, Pencil, RefreshCw, Share2, Star, Trash2, Cake, User, Users, Plus, Eraser, Palette, Shuffle } from "@/components/icons"; +import { Check, ChevronDown, ChevronRight, Globe, ListTodo, MoreVertical, Pencil, RefreshCw, Share2, Star, Trash2, Cake, User, Users, Plus, Eraser, Palette, Shuffle } from "@/components/icons"; import { cn, formatDateTime } from "@/lib/utils"; import type { Calendar } from "@/lib/jmap/types"; import { CalendarColorPicker } from "@/components/settings/calendar-management-settings"; @@ -17,6 +17,7 @@ import { ContextMenu, ContextMenuItem, ContextMenuSeparator, ContextMenuSubMenu import { useContextMenu } from "@/hooks/use-context-menu"; import type { IJMAPClient } from '@/lib/jmap/client-interface'; import { displayNow } from "@/lib/timezone"; +import { readableTextOn } from "@/lib/color-transform"; /** * Split a per-account calendar list into "owned" (the user's own) and @@ -243,26 +244,33 @@ export function CalendarSidebarPanel({ const hasMenu = isSubscriptionCalendar(cal.id) ? !!client : true; return ( -