From b58a04b0307e1313c990cd02b3a3758f5e6a9fb1 Mon Sep 17 00:00:00 2001 From: Theis Gaedigk Date: Tue, 27 Jan 2026 21:26:18 +0100 Subject: [PATCH] edited contact page and header --- FrontendV2/src/components/Header.tsx | 43 ++++++++++---------- FrontendV2/src/pages/ContactPage.tsx | 8 ++-- FrontendV2/src/utils/i18n/locales/de/de.json | 11 ++++- FrontendV2/src/utils/i18n/locales/en/en.json | 11 ++++- 4 files changed, 46 insertions(+), 27 deletions(-) diff --git a/FrontendV2/src/components/Header.tsx b/FrontendV2/src/components/Header.tsx index a01199e..48f4813 100644 --- a/FrontendV2/src/components/Header.tsx +++ b/FrontendV2/src/components/Header.tsx @@ -23,6 +23,7 @@ import { MoreVertical, Languages, Table, + ContactRound, } from "lucide-react"; import { useUserContext } from "@/states/Context"; import { useState } from "react"; @@ -144,7 +145,7 @@ export const Header = () => { window.open( "https://git.the1s.de/Matthias-Claudius-Schule/borrow-system/wiki", "_blank", - "noopener,noreferrer" + "noopener,noreferrer", ) } children={ @@ -155,18 +156,12 @@ export const Header = () => { } /> - window.open( - "https://git.the1s.de/Matthias-Claudius-Schule/borrow-system", - "_blank", - "noopener,noreferrer" - ) - } + value="contact" + onSelect={() => navigate("/contact", { replace: true })} children={ - - {t("source-code")} + + {t("contact")} } /> @@ -296,17 +291,15 @@ export const Header = () => { - navigate("/contact", { replace: true })} > - - + + + {t("contact")} + + - + ); }; diff --git a/FrontendV2/src/utils/i18n/locales/de/de.json b/FrontendV2/src/utils/i18n/locales/de/de.json index 2d7cf8f..95fa174 100644 --- a/FrontendV2/src/utils/i18n/locales/de/de.json +++ b/FrontendV2/src/utils/i18n/locales/de/de.json @@ -72,5 +72,14 @@ "last-borrowed-person": "Zuletzt ausgeliehen von", "currently-borrowed-by": "Derzeit ausgeliehen von", "back": "Zurückgehen", - "landingpage": "Übersichtsseite" + "landingpage": "Übersichtsseite", + "contactPage_successHeadline": "Nachricht erfolgreich gesendet", + "contactPage_successText": "Vielen Dank, dass Sie uns kontaktiert haben. Wir werden uns so schnell wie möglich bei Ihnen melden.", + "contactPage_errorHeadline": "Fehler beim Senden der Nachricht", + "contactPage_errorText": "Beim Senden Ihrer Nachricht ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.", + "contactPage_sendButton": "Nachricht senden", + "contactPage_messageLabel": "Nachricht", + "contactPage_messagePlaceholder": "Geben Sie hier Ihre Nachricht ein...", + "contactPage_messageErrorText": "Dieses Feld darf nicht leer sein.", + "contact": "Kontakt" } \ No newline at end of file diff --git a/FrontendV2/src/utils/i18n/locales/en/en.json b/FrontendV2/src/utils/i18n/locales/en/en.json index 8091bb0..4e782cd 100644 --- a/FrontendV2/src/utils/i18n/locales/en/en.json +++ b/FrontendV2/src/utils/i18n/locales/en/en.json @@ -72,5 +72,14 @@ "last-borrowed-person": "Last borrowed by", "currently-borrowed-by": "Currently borrowed by", "back": "Go back", - "landingpage": "Overview page" + "landingpage": "Overview page", + "contactPage_successHeadline": "Message sent successfully", + "contactPage_successText": "Thank you for contacting us. We will get back to you as soon as possible.", + "contactPage_errorHeadline": "Error sending message", + "contactPage_errorText": "An error occurred while sending your message. Please try again later.", + "contactPage_sendButton": "Send message", + "contactPage_messageLabel": "Message", + "contactPage_messagePlaceholder": "Enter your message here...", + "contactPage_messageErrorText": "This field cannot be empty.", + "contact": "Contact" } \ No newline at end of file