Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -41,6 +41,7 @@ import { splitDateTime, combineDateTime } from "./utils/dateTimeHelpers";
|
||||
import {} from "./utils/dateRules";
|
||||
import {} from "./utils/dateTimeFormatters";
|
||||
import { validateEventForm } from "./utils/formValidation";
|
||||
import { SnackbarAlert } from "../Loading/SnackBarAlert";
|
||||
|
||||
interface EventFormFieldsProps {
|
||||
// Form state
|
||||
@@ -379,10 +380,13 @@ export default function EventFormFields({
|
||||
setMeetingLink(newMeetingLink);
|
||||
};
|
||||
|
||||
const [openToast, setOpenToast] = React.useState(false);
|
||||
|
||||
const handleCopyMeetingLink = async () => {
|
||||
if (meetingLink) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(meetingLink);
|
||||
setOpenToast(true);
|
||||
} catch (err) {
|
||||
console.error("Failed to copy link:", err);
|
||||
}
|
||||
@@ -752,6 +756,11 @@ export default function EventFormFields({
|
||||
</FieldWithLabel>
|
||||
</>
|
||||
)}
|
||||
<SnackbarAlert
|
||||
setOpen={setOpenToast}
|
||||
open={openToast}
|
||||
message={t("event.form.meetCopied")}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
"timezonePlaceholder": "Select timezone",
|
||||
"participants": "Participants",
|
||||
"videoMeeting": "Video meeting",
|
||||
"meetCopied": "Meeting link copied!",
|
||||
"addVisioConference": "Add Visio conference",
|
||||
"joinVisioConference": "Join Visio conference",
|
||||
"copyMeetingLink": "Copy meeting link",
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
"timezonePlaceholder": "Sélectionner un fuseau horaire",
|
||||
"participants": "Participants",
|
||||
"videoMeeting": "Visioconférence",
|
||||
"meetCopied": "Lien de la visio copié!",
|
||||
"addVisioConference": "Ajouter une visioconférence",
|
||||
"joinVisioConference": "Rejoindre la visioconférence",
|
||||
"copyMeetingLink": "Copier le lien de la réunion",
|
||||
|
||||
Reference in New Issue
Block a user