diff --git a/frontend/src/components/calendar/CalendarPage.tsx b/frontend/src/components/calendar/CalendarPage.tsx index c1cef0f..51262e8 100644 --- a/frontend/src/components/calendar/CalendarPage.tsx +++ b/frontend/src/components/calendar/CalendarPage.tsx @@ -8,7 +8,7 @@ import dayGridPlugin from '@fullcalendar/daygrid'; import timeGridPlugin from '@fullcalendar/timegrid'; import interactionPlugin from '@fullcalendar/interaction'; import type { EventClickArg, DateSelectArg, EventDropArg, DatesSetArg } from '@fullcalendar/core'; -import { ChevronLeft, ChevronRight, Plus, Search } from 'lucide-react'; +import { ChevronLeft, ChevronRight, PanelLeft, Plus, Search } from 'lucide-react'; import api, { getErrorMessage } from '@/lib/api'; import axios from 'axios'; import type { CalendarEvent, EventTemplate, Location as LocationType, CalendarPermission } from '@/types'; @@ -17,6 +17,7 @@ import { useSettings } from '@/hooks/useSettings'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Select } from '@/components/ui/select'; +import { Sheet, SheetContent } from '@/components/ui/sheet'; import CalendarSidebar from './CalendarSidebar'; import EventDetailPanel from './EventDetailPanel'; import type { CreateDefaults } from './EventDetailPanel'; @@ -164,6 +165,8 @@ export default function CalendarPage() { // Track desktop breakpoint to prevent dual EventDetailPanel mount const isDesktop = useMediaQuery('(min-width: 1024px)'); + const isMobile = useMediaQuery('(max-width: 1023px)'); + const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false); // Continuously resize calendar during panel open/close CSS transition useEffect(() => { @@ -471,15 +474,28 @@ export default function CalendarPage() { return (
- -
+
+ +
+
+ + {isMobile && ( + + + { setMobileSidebarOpen(false); handleUseTemplate(tmpl); }} onSharedVisibilityChange={setVisibleSharedIds} width={288} /> + + + )}
{/* Custom toolbar */}
+