From d3a5b4189e7783dd24ff2ba2920c5b644a39fe19 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Wed, 11 Mar 2026 20:35:25 +0100
Subject: [PATCH] feat: enhance event modal for desktop and mobile views
---
app/[locale]/calendar/page.tsx | 22 +++++++++++++++++++++-
components/calendar/event-modal.tsx | 24 ++++++++++++------------
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/app/[locale]/calendar/page.tsx b/app/[locale]/calendar/page.tsx
index ac34ae1a..e446d29c 100644
--- a/app/[locale]/calendar/page.tsx
+++ b/app/[locale]/calendar/page.tsx
@@ -683,6 +683,25 @@ export default function CalendarPage() {
{renderView()}
+ {/* Desktop event panel */}
+ {!isMobile && showEventModal && (
+
+ { setShowEventModal(false); setEditEvent(null); }}
+ currentUserEmails={currentUserEmails}
+ isMobile={false}
+ />
+
+ )}
+
{/* Floating Create Event Button (mobile) */}
{isMobile && (
)}
- {showEventModal && (
+ {showEventModal && isMobile && (
{ setShowEventModal(false); setEditEvent(null); }}
currentUserEmails={currentUserEmails}
+ isMobile={true}
/>
)}
diff --git a/components/calendar/event-modal.tsx b/components/calendar/event-modal.tsx
index a0b158d5..43f87f80 100644
--- a/components/calendar/event-modal.tsx
+++ b/components/calendar/event-modal.tsx
@@ -29,6 +29,7 @@ interface EventModalProps {
onRsvp?: (eventId: string, participantId: string, status: CalendarParticipant['participationStatus']) => void;
onClose: () => void;
currentUserEmails?: string[];
+ isMobile?: boolean;
}
function formatDateInput(d: Date): string {
@@ -68,6 +69,7 @@ export function EventModal({
onRsvp,
onClose,
currentUserEmails = [],
+ isMobile = false,
}: EventModalProps) {
const t = useTranslations("calendar");
const isEdit = !!event;
@@ -374,16 +376,15 @@ export function EventModal({
const participants = getParticipantList(event);
return (
-
-
-
-
+
+
{event.title || t("events.no_title")}
+
@@ -431,8 +432,9 @@ export function EventModal({
)}
+
-
+
{t("participants.rsvp_label")}
@@ -472,16 +474,13 @@ export function EventModal({
-
);
}
return (
-
-
-
-
+
+
{isEdit ? t("events.edit") : t("events.create")}
@@ -490,6 +489,7 @@ export function EventModal({
+
@@ -665,8 +665,9 @@ export function EventModal({
)}
+
-
+
{isEdit && onDelete && (
showDeleteConfirm ? (
@@ -727,7 +728,6 @@ export function EventModal({
-
);
}