diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index f5d141d..24f76e2 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -208,6 +208,13 @@ export const ui = { newTitle: "Neu hier?", newText: "Lege ein Konto an, um Bestellhistorie, Wunschliste und Sendungsverfolgung an einem Ort zu haben – oder bestelle einfach als Gast, ganz ohne Konto.", guestButton: "Als Gast weiter einkaufen", loginError: "Bitte gib eine E-Mail-Adresse ein.", + socialHeading: "Schneller anmelden mit", + socialGoogle: "Mit Google anmelden", socialApple: "Mit Apple anmelden", socialPaypal: "Mit PayPal anmelden", + socialComingSoon: "Kommt in Phase 2: Sobald die echte Konto-Anbindung steht, kannst du dich hier direkt anmelden — ganz ohne neues Passwort.", + orDivider: "oder mit E-Mail", + showPassword: "Passwort anzeigen", hidePassword: "Passwort verbergen", + rememberMe: "Angemeldet bleiben", + consentPrefix: "Mit der Anmeldung akzeptierst du unsere", consentLink: "Datenschutzerklärung", consentSuffix: ".", }, accountDash: { eyebrow: "Mein Konto", greeting: (name: string) => `Hallo ${name} 🩵`, lead: "Schön, dass du wieder da bist. Hier findest du alle deine Bestellungen, deine Wunschliste und deine Daten auf einen Blick.", @@ -429,6 +436,13 @@ export const ui = { newTitle: "New here?", newText: "Create an account to keep order history, wishlist and tracking in one place – or simply check out as a guest, no account needed.", guestButton: "Continue shopping as guest", loginError: "Please enter an email address.", + socialHeading: "Sign in faster with", + socialGoogle: "Sign in with Google", socialApple: "Sign in with Apple", socialPaypal: "Sign in with PayPal", + socialComingSoon: "Coming in Phase 2: once the real account backend is live, you'll be able to sign in here directly — no new password needed.", + orDivider: "or with email", + showPassword: "Show password", hidePassword: "Hide password", + rememberMe: "Keep me signed in", + consentPrefix: "By signing in you accept our", consentLink: "privacy policy", consentSuffix: ".", }, accountDash: { eyebrow: "My Account", greeting: (name: string) => `Hello ${name} 🩵`, lead: "Good to see you again. Here you'll find all your orders, your wishlist and your details at a glance.", @@ -650,6 +664,13 @@ export const ui = { newTitle: "Neu da?", newText: "Leg es Konto a, für Bstellhistorie, Wunschlischte und Sändigsverfolgig a einem Ort z'ha – oder bstell eifach als Gast, ganz ohni Konto.", guestButton: "Als Gast wyter yichaufe", loginError: "Bitte gib e E-Mail-Adrässe i.", + socialHeading: "Schnäller aamälde mit", + socialGoogle: "Mit Google aamälde", socialApple: "Mit Apple aamälde", socialPaypal: "Mit PayPal aamälde", + socialComingSoon: "Chunnt i Phase 2: Sobald d'echti Konto-Aabindig staht, chasch di da direkt aamälde — ganz ohni nöis Passwort.", + orDivider: "oder mit E-Mail", + showPassword: "Passwort azeige", hidePassword: "Passwort verstecke", + rememberMe: "Aagmäldet bliebe", + consentPrefix: "Mit dr Aamäldig akzeptiersch üsi", consentLink: "Datenschutzerklärig", consentSuffix: ".", }, accountDash: { eyebrow: "Mis Konto", greeting: (name: string) => `Hoi ${name} 🩵`, lead: "Schön, bisch wieder da. Da findsch alli dini Bstellige, dini Wunschlischte und dini Date uf ein Blick.", @@ -871,6 +892,13 @@ export const ui = { newTitle: "Nouveau ici ?", newText: "Créez un compte pour retrouver l'historique des commandes, la liste de souhaits et le suivi au même endroit – ou commandez simplement en tant qu'invité, sans compte.", guestButton: "Continuer mes achats en tant qu'invité", loginError: "Veuillez saisir une adresse e-mail.", + socialHeading: "Connexion plus rapide avec", + socialGoogle: "Se connecter avec Google", socialApple: "Se connecter avec Apple", socialPaypal: "Se connecter avec PayPal", + socialComingSoon: "Disponible en phase 2 : dès que la vraie connexion au compte sera en place, vous pourrez vous connecter directement ici — sans nouveau mot de passe.", + orDivider: "ou avec e-mail", + showPassword: "Afficher le mot de passe", hidePassword: "Masquer le mot de passe", + rememberMe: "Rester connecté(e)", + consentPrefix: "En vous connectant, vous acceptez notre", consentLink: "politique de confidentialité", consentSuffix: ".", }, accountDash: { eyebrow: "Mon compte", greeting: (name: string) => `Bonjour ${name} 🩵`, lead: "Ravie de vous revoir. Retrouvez ici toutes vos commandes, votre liste de souhaits et vos données en un coup d'œil.", diff --git a/src/pages/ch/konto/index.astro b/src/pages/ch/konto/index.astro index 73c5b2f..f8f2b8b 100644 --- a/src/pages/ch/konto/index.astro +++ b/src/pages/ch/konto/index.astro @@ -19,11 +19,60 @@ const t = useTranslations(lang);

{t.account.loginTitle}

-
-
+ + {/* Social-Login: in DE/DACH übliche Alternativen zu E-Mail/Passwort — Google und Apple + als verbreitetste Anbieter, PayPal zusätzlich wegen seiner Marktdominanz bei + Zahlungen in Deutschland (siehe Recherche). Ohne eigenes Backend noch nicht + funktional; ein Klick zeigt ehrlich den Phase-2-Hinweis statt eine Anmeldung + vorzutäuschen. */} + + + + +
+
+ +
+ + +
+
+ +
+ + +
+ {t.account.forgotPassword} + +
@@ -51,4 +100,28 @@ const t = useTranslations(lang); login(email); window.location.href = "/ch/konto/angemeldet/"; }); + + // Passwort-Sichtbarkeits-Toggle — rein clientseitig, braucht kein Backend. + const pwInput = document.getElementById("login-pw") as HTMLInputElement | null; + const pwToggle = document.getElementById("login-pw-toggle") as HTMLButtonElement | null; + const EYE_OPEN = ``; + const EYE_CLOSED = ``; + pwToggle?.addEventListener("click", () => { + if (!pwInput) return; + const showing = pwInput.type === "text"; + pwInput.type = showing ? "password" : "text"; + pwToggle.setAttribute("aria-pressed", String(!showing)); + pwToggle.setAttribute("aria-label", showing ? (pwToggle.dataset.showLabel ?? "") : (pwToggle.dataset.hideLabel ?? "")); + const icon = document.getElementById("login-pw-icon"); + if (icon) icon.innerHTML = showing ? EYE_OPEN : EYE_CLOSED; + }); + + // Social-Login-Buttons: kein echtes OAuth ohne Backend — Klick zeigt stattdessen ehrlich + // den Phase-2-Hinweis (siehe .social-note oben im Markup). + const socialNote = document.getElementById("social-note"); + document.querySelectorAll(".btn-social").forEach((btn) => { + btn.addEventListener("click", () => { + if (socialNote) socialNote.style.display = "block"; + }); + }); diff --git a/src/pages/en/konto/index.astro b/src/pages/en/konto/index.astro index f842e93..4040171 100644 --- a/src/pages/en/konto/index.astro +++ b/src/pages/en/konto/index.astro @@ -19,11 +19,60 @@ const t = useTranslations(lang);