diff --git a/src/components/Dialog/ResponsiveDialog.tsx b/src/components/Dialog/ResponsiveDialog.tsx index 0114bf9..e9768a7 100644 --- a/src/components/Dialog/ResponsiveDialog.tsx +++ b/src/components/Dialog/ResponsiveDialog.tsx @@ -116,6 +116,7 @@ function ResponsiveDialog({ }: ResponsiveDialogProps) { const baseSx: SxProps = { "& .MuiBackdrop-root": { + backgroundColor: "rgba(0, 0, 0, 0.1)", opacity: isExpanded ? "0 !important" : undefined, transition: isExpanded ? "none !important" : undefined, pointerEvents: isExpanded ? "none" : undefined, diff --git a/src/components/Event/InfoRow.tsx b/src/components/Event/InfoRow.tsx index de21085..436eaea 100644 --- a/src/components/Event/InfoRow.tsx +++ b/src/components/Event/InfoRow.tsx @@ -8,6 +8,7 @@ type InfoRowProps = { data?: string; // optional link target content?: React.ReactNode; // if provided, overrides text rendering style?: React.CSSProperties; + alignItems?: React.CSSProperties["alignItems"]; }; function detectUrls(text: string) { @@ -62,12 +63,13 @@ export function InfoRow({ data, content, style, + alignItems = "center", }: InfoRowProps) { return ( - - {a.cn || a.cal_address} + + {truncateDisplayText( + a.cn || a.cal_address, + EMAIL_DISPLAY_MAX_LENGTH + )} {isOrganizer && ( diff --git a/src/features/Events/EventDisplayPreview.tsx b/src/features/Events/EventDisplayPreview.tsx index 474334e..e3705ca 100644 --- a/src/features/Events/EventDisplayPreview.tsx +++ b/src/features/Events/EventDisplayPreview.tsx @@ -20,7 +20,9 @@ import { MenuItem, Tooltip, Typography, + useTheme, } from "@linagora/twake-mui"; +import { alpha } from "@mui/material/styles"; import CalendarTodayIcon from "@mui/icons-material/CalendarToday"; import CircleIcon from "@mui/icons-material/Circle"; import CloseIcon from "@mui/icons-material/Close"; @@ -73,6 +75,9 @@ export default function EventPreviewModal({ : calendars.list[calId]; const event = calendar.events[eventId]; const user = useAppSelector((state) => state.user.userData); + const theme = useTheme(); + const infoIconColor = alpha(theme.palette.grey[900], 0.9); + const infoIconSx = { minWidth: "25px", marginRight: 2, color: infoIconColor }; if (!user) return null; const isRecurring = event?.uid?.includes("/"); @@ -451,10 +456,10 @@ export default function EventPreviewModal({ title={t("eventPreview.privateEvent.tooltipOwn")} placement="top" > - + ) : ( - + ))} + } @@ -511,8 +517,9 @@ export default function EventPreviewModal({ {attendees?.length > 0 && ( <> + } @@ -585,8 +592,9 @@ export default function EventPreviewModal({ {/* Location */} {event.location && ( + } @@ -600,8 +608,9 @@ export default function EventPreviewModal({ {/* Description */} {event.description && ( + } @@ -615,8 +624,9 @@ export default function EventPreviewModal({ {/* ALARM */} {event.alarm && ( + } @@ -641,8 +651,9 @@ export default function EventPreviewModal({ {/* Repetition */} {event.repetition && ( + } @@ -681,8 +692,9 @@ export default function EventPreviewModal({ {/* Error */} {event.error && ( + } @@ -698,12 +710,12 @@ export default function EventPreviewModal({ - + diff --git a/src/utils/__test__/videoConferenceUtils.test.ts b/src/utils/__test__/videoConferenceUtils.test.ts index 906c99c..dc1cb77 100644 --- a/src/utils/__test__/videoConferenceUtils.test.ts +++ b/src/utils/__test__/videoConferenceUtils.test.ts @@ -45,11 +45,11 @@ describe("videoConferenceUtils", () => { }); describe("addVideoConferenceToDescription", () => { - it("should add video conference footer to empty description", () => { + it("should add video conference on first line when description is empty", () => { const description = ""; const meetingLink = "https://meet.linagora.com/abc-defg-hij"; const result = addVideoConferenceToDescription(description, meetingLink); - expect(result).toBe("\nVisio: https://meet.linagora.com/abc-defg-hij"); + expect(result).toBe("Visio: https://meet.linagora.com/abc-defg-hij"); }); it("should add video conference footer to existing description", () => { diff --git a/src/utils/videoConferenceUtils.ts b/src/utils/videoConferenceUtils.ts index d2ee7f2..7cc3f67 100644 --- a/src/utils/videoConferenceUtils.ts +++ b/src/utils/videoConferenceUtils.ts @@ -33,7 +33,8 @@ export function generateMeetingLink(baseUrl?: string): string { } /** - * Add video conference footer to event description + * Add video conference footer to event description. + * If description is empty, adds on first line; otherwise adds on the line below existing content. * @param {string} description - Original description * @param {string} meetingLink - Generated meeting link * @returns {string} Description with video conference footer @@ -42,8 +43,9 @@ export function addVideoConferenceToDescription( description: string, meetingLink: string ): string { - const footer = `\nVisio: ${meetingLink}`; - return description + footer; + const line = `Visio: ${meetingLink}`; + const trimmed = description.trimEnd(); + return trimmed ? `${trimmed}\n${line}` : line; } /**