Fix mail layouts, /invite form-reset, profile validation
Mail templates (6 templates touched): - New shared `_styles.ts` exports a robust font stack starting with Arial/Helvetica so mail readers that lack -apple-system and BlinkMacSystemFont don't fall back to Monospace (observed in at least one webmail client). - `fontFamily` is now set on every text-bearing element, not only on `<Body>`, because some clients (Outlook, several webmail readers) do not inherit body CSS into nested sections. - ASCII substitutions are gone: "Ueber" → "Über", "fuer" → "für", "bestaetigen" → "bestätigen", "uebernehmen" → "übernehmen", "verlaesslich" → "verlässlich". - InviteEmail + NewsEmail buttons switch from the off-brand yellow (#f0b84b) to the brand dark green so the CTA matches the header. /invite form: - InviteState gains an `attempt` counter plus echoed checkbox `values`, mirroring the /register and /onboarding fix from earlier branches. A failed submit no longer wipes the Datenschutz / Adressbuch-Opt-In ticks. Passwords stay empty for security. - Field error <p> elements gain role="alert" + aria-live="polite" so screen readers announce validation failures on submit. Inputs use aria-describedby to link to error / helper text. Profile validation: - Telephone numbers must match a permissive pattern that still rejects obvious garbage (previously "abc-123-not-a-phone" was accepted). - Postal codes must match an alphanumeric pattern of 3–10 chars (previously "ABCDE" was accepted). - Child date-of-birth is now validated via superRefine: it must be a parseable date, not in the future, and not before 1900. Previously a kid born in 2030 was accepted. - The three Profil server actions now surface the first Zod issue message instead of generic "Ungültige Eingabedaten." toasts. Misc: - "fuer" → "für" in the Adressbuch page subtitle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
211bb9e300
commit
fa06da324c
@@ -11,6 +11,8 @@ import {
|
||||
Text,
|
||||
} from "@react-email/components";
|
||||
|
||||
import { fontStack } from "./_styles";
|
||||
|
||||
type NewsEmailProps = {
|
||||
title: string;
|
||||
content: string;
|
||||
@@ -53,7 +55,7 @@ const styles = {
|
||||
body: {
|
||||
margin: 0,
|
||||
backgroundColor: "#f5f3ee",
|
||||
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
||||
fontFamily: fontStack,
|
||||
color: "#25231f",
|
||||
},
|
||||
container: {
|
||||
@@ -61,11 +63,13 @@ const styles = {
|
||||
maxWidth: "600px",
|
||||
margin: "0 auto",
|
||||
padding: "32px 20px",
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
header: {
|
||||
padding: "28px",
|
||||
backgroundColor: "#243b36",
|
||||
borderRadius: "8px 8px 0 0",
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
kicker: {
|
||||
margin: "0 0 20px",
|
||||
@@ -74,6 +78,7 @@ const styles = {
|
||||
fontWeight: 800,
|
||||
letterSpacing: "0.08em",
|
||||
textTransform: "uppercase" as const,
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
heading: {
|
||||
margin: 0,
|
||||
@@ -81,6 +86,7 @@ const styles = {
|
||||
fontSize: "28px",
|
||||
lineHeight: "1.2",
|
||||
fontWeight: 800,
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
card: {
|
||||
padding: "28px",
|
||||
@@ -88,6 +94,7 @@ const styles = {
|
||||
border: "1px solid #deded5",
|
||||
borderTop: "0",
|
||||
borderRadius: "0 0 8px 8px",
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
text: {
|
||||
margin: "0 0 24px",
|
||||
@@ -95,16 +102,18 @@ const styles = {
|
||||
fontSize: "15px",
|
||||
lineHeight: "1.65",
|
||||
whiteSpace: "pre-wrap" as const,
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
button: {
|
||||
display: "inline-block",
|
||||
padding: "13px 20px",
|
||||
backgroundColor: "#f0b84b",
|
||||
color: "#172119",
|
||||
backgroundColor: "#243b36",
|
||||
color: "#ffffff",
|
||||
borderRadius: "6px",
|
||||
fontSize: "15px",
|
||||
fontWeight: 800,
|
||||
fontWeight: 700,
|
||||
textDecoration: "none",
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
hr: {
|
||||
margin: "24px 0",
|
||||
@@ -116,5 +125,6 @@ const styles = {
|
||||
fontSize: "12px",
|
||||
lineHeight: "1.5",
|
||||
textAlign: "center" as const,
|
||||
fontFamily: fontStack,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user