-
+
{dateLabel}
@@ -255,16 +255,14 @@ export function Menubar({
{user?.name && user?.family_name
@@ -333,17 +331,15 @@ export function Menubar({
}}
>
{user?.name && user?.family_name
? `${user.name[0]}${user.family_name[0]}`
diff --git a/src/components/Timezone/TimezoneAutocomplete.tsx b/src/components/Timezone/TimezoneAutocomplete.tsx
index 35a5151..64638c9 100644
--- a/src/components/Timezone/TimezoneAutocomplete.tsx
+++ b/src/components/Timezone/TimezoneAutocomplete.tsx
@@ -1,4 +1,4 @@
-import { Autocomplete, TextField } from "@mui/material";
+import { Autocomplete, TextField } from "@linagora/twake-mui";
import { PublicOutlined as TimezoneIcon } from "@mui/icons-material";
import { useMemo } from "react";
diff --git a/src/features/Events/AttendanceValidation/AttendanceValidation.tsx b/src/features/Events/AttendanceValidation/AttendanceValidation.tsx
index e3dce1f..b1a7e5c 100644
--- a/src/features/Events/AttendanceValidation/AttendanceValidation.tsx
+++ b/src/features/Events/AttendanceValidation/AttendanceValidation.tsx
@@ -1,4 +1,4 @@
-import { Box, Typography } from "@mui/material";
+import { Box, Typography } from "@linagora/twake-mui";
import { Dispatch, SetStateAction } from "react";
import { useI18n } from "twake-i18n";
import { Calendar } from "../../Calendars/CalendarTypes";
diff --git a/src/features/Events/AttendanceValidation/RSVPButton.tsx b/src/features/Events/AttendanceValidation/RSVPButton.tsx
index 2c29c53..8c308d4 100644
--- a/src/features/Events/AttendanceValidation/RSVPButton.tsx
+++ b/src/features/Events/AttendanceValidation/RSVPButton.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@mui/material";
+import { Button } from "@linagora/twake-mui";
import { Dispatch, SetStateAction } from "react";
import { useI18n } from "twake-i18n";
import { useAppDispatch } from "../../../app/hooks";
diff --git a/src/features/Events/EventDisplayPreview.tsx b/src/features/Events/EventDisplayPreview.tsx
index 757104d..c2dc159 100644
--- a/src/features/Events/EventDisplayPreview.tsx
+++ b/src/features/Events/EventDisplayPreview.tsx
@@ -13,7 +13,7 @@ import PeopleAltOutlinedIcon from "@mui/icons-material/PeopleAltOutlined";
import RepeatIcon from "@mui/icons-material/Repeat";
import SubjectIcon from "@mui/icons-material/Subject";
import VideocamIcon from "@mui/icons-material/Videocam";
-import { Box, Typography } from "@mui/material";
+import { Box, Typography } from "@linagora/twake-mui";
import EventPopover from "./EventModal";
import {
Button,
@@ -23,8 +23,8 @@ import {
Menu,
MenuItem,
Tooltip,
-} from "@mui/material";
-import AvatarGroup from "@mui/material/AvatarGroup";
+} from "@linagora/twake-mui";
+import { AvatarGroup } from "@linagora/twake-mui";
import { useEffect, useState, useRef } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
import { CalendarName } from "../../components/Calendar/CalendarName";
@@ -49,7 +49,6 @@ import { userAttendee } from "../User/models/attendee";
import { browserDefaultTimeZone } from "../../utils/timezone";
import { AttendanceValidation } from "./AttendanceValidation/AttendanceValidation";
import { Calendar } from "../Calendars/CalendarTypes";
-import { userData } from "../User/userDataTypes";
import { createEventContext } from "./createEventContext";
export default function EventPreviewModal({
@@ -369,7 +368,9 @@ export default function EventPreviewModal({
`${mailSpaUrl}/mailto/?uri=mailto:${event.attendee
.map((a) => a.cal_address)
.filter((mail) => mail !== user.email)
- .join(",")}?subject=${event.title}`
+ .join(
+ ","
+ )}?subject=${encodeURIComponent(event.title ?? "")}`
)
}
>
@@ -402,18 +403,28 @@ export default function EventPreviewModal({
eventId
)
);
- setOpenEditModePopup("edit");
+ setOpenEditModePopup("delete");
} else {
onClose({}, "backdropClick");
- await dispatch(
- deleteEventAsync({
- calId,
- eventId,
- eventURL: event.URL,
- })
- );
+ try {
+ const result = await dispatch(
+ deleteEventAsync({
+ calId,
+ eventId,
+ eventURL: event.URL,
+ })
+ );
+
+ // For compatibility with tests that may not mock unwrap
+ if (result && typeof result.unwrap === "function") {
+ await result.unwrap();
+ }
+
+ updateTempList();
+ } catch (error) {
+ console.error("Failed to delete event:", error);
+ }
}
- updateTempList();
}}
>
{t("eventPreview.deleteEvent")}
@@ -616,7 +627,15 @@ export default function EventPreviewModal({
}
text={t("eventPreview.alarmText", {
trigger: t(`event.form.notifications.${event.alarm.trigger}`),
- action: t(`event.form.notifications.${event.alarm.action}`),
+ action: (() => {
+ if (!event.alarm.action) return "";
+ const translationKey = `event.form.notifications.${event.alarm.action}`;
+ const translated = t(translationKey);
+ // If translation returns the key itself, it means translation not found, use raw value
+ return translated === translationKey
+ ? event.alarm.action
+ : translated;
+ })(),
})}
style={{
fontSize: "16px",
diff --git a/src/features/Events/EventModal.tsx b/src/features/Events/EventModal.tsx
index b737700..414f120 100644
--- a/src/features/Events/EventModal.tsx
+++ b/src/features/Events/EventModal.tsx
@@ -1,5 +1,5 @@
import { CalendarApi, DateSelectArg } from "@fullcalendar/core";
-import { Box, Button } from "@mui/material";
+import { Box, Button } from "@linagora/twake-mui";
import AddIcon from "@mui/icons-material/Add";
import React, {
useEffect,
diff --git a/src/features/Events/EventUpdateModal.tsx b/src/features/Events/EventUpdateModal.tsx
index 2a1bba4..a10a45f 100644
--- a/src/features/Events/EventUpdateModal.tsx
+++ b/src/features/Events/EventUpdateModal.tsx
@@ -1,4 +1,4 @@
-import { Box, Button } from "@mui/material";
+import { Box, Button } from "@linagora/twake-mui";
import AddIcon from "@mui/icons-material/Add";
import { useEffect, useState, useMemo, useCallback, useRef } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
diff --git a/src/features/Search/SearchResultsPage.tsx b/src/features/Search/SearchResultsPage.tsx
index 895bf5d..7f02e9c 100644
--- a/src/features/Search/SearchResultsPage.tsx
+++ b/src/features/Search/SearchResultsPage.tsx
@@ -2,8 +2,14 @@ import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import RepeatIcon from "@mui/icons-material/Repeat";
import SquareRoundedIcon from "@mui/icons-material/SquareRounded";
import VideocamIcon from "@mui/icons-material/Videocam";
-import { Box, Button, IconButton, Stack, Typography } from "@mui/material";
-import CircularProgress from "@mui/material/CircularProgress";
+import {
+ Box,
+ Button,
+ IconButton,
+ Stack,
+ Typography,
+ CircularProgress,
+} from "@linagora/twake-mui";
import { useI18n } from "twake-i18n";
import { useState } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
diff --git a/src/features/Settings/SettingsPage.tsx b/src/features/Settings/SettingsPage.tsx
index c846e40..e01112a 100644
--- a/src/features/Settings/SettingsPage.tsx
+++ b/src/features/Settings/SettingsPage.tsx
@@ -15,7 +15,7 @@ import {
Snackbar,
Switch,
FormControlLabel,
-} from "@mui/material";
+} from "@linagora/twake-mui";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import SettingsIcon from "@mui/icons-material/Settings";
// import SyncIcon from "@mui/icons-material/Sync";
@@ -418,11 +418,7 @@ export default function SettingsPage() {
)}
{activeSettingsSubTab === "notifications" && (
-
+
{t("settings.notifications.deliveryMethod") ||
"Delivery method"}
diff --git a/src/locales/en.json b/src/locales/en.json
index 8c36452..5643d43 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -152,7 +152,9 @@
"-PT1D": "1 day before",
"-PT2D": "2 days before",
"-PT1W": "1 week before",
- "EMAIL": "email"
+ "EMAIL": "email",
+ "DISPLAY": "display",
+ "AUDIO": "audio"
},
"showMeAs": "Show me as",
"free": "Free",
@@ -188,6 +190,7 @@
"editModeDialog": {
"updateRecurrentEvent": "Update the recurrent event",
"updateParticipationStatus": "Update the participation status",
+ "deleteRecurrentEvent": "Delete the recurrent event",
"thisEvent": "This event",
"allEvents": "All the events"
},
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 860042e..deda948 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -154,7 +154,9 @@
"-PT1D": "1 jour avant",
"-PT2D": "2 jours avant",
"-PT1W": "1 semaine avant",
- "EMAIL": "e-mail"
+ "EMAIL": "e-mail",
+ "DISPLAY": "affichage",
+ "AUDIO": "audio"
},
"showMeAs": "M'afficher comme",
"free": "Libre",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index c0351b8..04c2141 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -154,7 +154,9 @@
"-PT1D": "За 1 день",
"-PT2D": "За 2 дня",
"-PT1W": "За 1 неделю",
- "EMAIL": "Email"
+ "EMAIL": "Email",
+ "DISPLAY": "Отображение",
+ "AUDIO": "Звук"
},
"showMeAs": "Показать как",
"free": "Свободен",
diff --git a/src/locales/vi.json b/src/locales/vi.json
index b9e5e4e..2e33a4f 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -152,7 +152,9 @@
"-PT1D": "1 ngày trước",
"-PT2D": "2 ngày trước",
"-PT1W": "1 tuần trước",
- "EMAIL": "email"
+ "EMAIL": "email",
+ "DISPLAY": "hiển thị",
+ "AUDIO": "âm thanh"
},
"showMeAs": "Hiển thị tôi là",
"free": "Rảnh",
diff --git a/src/theme/ThemeProvider.tsx b/src/theme/ThemeProvider.tsx
deleted file mode 100644
index cad62ff..0000000
--- a/src/theme/ThemeProvider.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from "react";
-import { ThemeProvider } from "@mui/material/styles";
-import { CssBaseline } from "@mui/material";
-import { customTheme } from "./theme";
-
-interface CustomThemeProviderProps {
- children: React.ReactNode;
-}
-
-export function CustomThemeProvider({ children }: CustomThemeProviderProps) {
- return (
-
-
- {children}
-
- );
-}
-
-export { customTheme };
diff --git a/src/theme/theme.ts b/src/theme/theme.ts
deleted file mode 100644
index fd23305..0000000
--- a/src/theme/theme.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { createTheme } from "@mui/material/styles";
-
-// Custom theme for Twake Calendar
-export const customTheme = createTheme({
- palette: {
- text: {
- primary: "#000000",
- secondary: "#717D96",
- secondaryContainer: "#243B55",
- },
- },
- typography: {
- caption: {
- fontSize: "0.75rem",
- fontWeight: 400,
- lineHeight: 1.4,
- color: "#8C9CAF", // Custom secondary text color
- },
- },
- components: {
- // Custom Typography component
- MuiTypography: {
- styleOverrides: {
- // Custom variant for event info text
- caption: {
- fontSize: "13px",
- color: "#717D96",
- },
- },
- },
- // Custom Button component
- // Custom Dialog component
- // Custom DialogActions component
- },
-});
-
-// Export theme type for TypeScript
-export type CustomTheme = typeof customTheme;
diff --git a/src/utils/avatarUtils.ts b/src/utils/avatarUtils.ts
new file mode 100644
index 0000000..f5c1101
--- /dev/null
+++ b/src/utils/avatarUtils.ts
@@ -0,0 +1,11 @@
+import { nameToColor } from "@linagora/twake-mui";
+
+/**
+ * Generate a gradient color from a string
+ * @param str - String to generate color from
+ * @returns Color name for gradient
+ */
+export function stringToGradient(str: string): string | undefined {
+ if (!str) return undefined;
+ return nameToColor(str);
+}