diff --git a/src/frontend/public/sounds/mail-sent.ogg b/src/frontend/public/sounds/mail-sent.ogg new file mode 100644 index 00000000..27bef539 Binary files /dev/null and b/src/frontend/public/sounds/mail-sent.ogg differ diff --git a/src/frontend/src/features/i18n/translations.json b/src/frontend/src/features/i18n/translations.json index 9926a13b..5aa3f2bc 100644 --- a/src/frontend/src/features/i18n/translations.json +++ b/src/frontend/src/features/i18n/translations.json @@ -8,6 +8,9 @@ "my_account": "My Account", "no_mailbox": "No mailbox.", "no_threads": "No threads.", + "new_message_form": { + "title": "New message" + }, "api": { "error": { "unexpected": "An unexpected error occurred." @@ -38,7 +41,9 @@ "from": "From: ", "to": "To: ", "cc": "Copy: ", - "bcc": "Blind copy: " + "bcc": "Blind copy: ", + "subject": "Subject: ", + "body": "Message: " } } }, @@ -51,6 +56,9 @@ "my_account": "Mon Compte", "no_mailbox": "Aucune boîte aux lettres.", "no_threads": "Aucune conversation.", + "new_message_form": { + "title": "Nouveau message" + }, "api": { "error": { "unexpected": "Une erreur inattendue est survenue." @@ -81,7 +89,9 @@ "from": "De : ", "to": "À : ", "cc": "Copie : ", - "bcc": "Copie cachée : " + "bcc": "Copie cachée : ", + "subject": "Sujet : ", + "body": "Message : " } } } diff --git a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/index.tsx b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/index.tsx index bf36f737..1196bd52 100644 --- a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/index.tsx +++ b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/index.tsx @@ -1,12 +1,23 @@ import { Button } from "@openfun/cunningham-react"; +import { useRouter } from "next/router"; import { useTranslation } from "react-i18next"; export const MailboxPanelActions = () => { const { t } = useTranslation(); + const router = useRouter(); + + const goToNewMessageForm = (event: React.MouseEvent) => { + event.preventDefault(); + router.push(`/mailbox/new`); + } return (
- {/*