chahinebrini 5434254f74 feat(auth,mail): pw-reset OTP-flow + custom mail templates + account-switch cleanup
- Phase 3 PW-Reset: 3 screens (forgot-password → reset-otp → new-password),
  verifyOtp({type:'recovery'}), new updatePassword() action
- Custom Brevo-Mail templates (backend/public/templates/) — 5 HTMLs with
  go-template i18n (de/en/fr/ar incl. RTL for AR), OTP-only (no link),
  ReBreak branding
- signUp metadata.data.locale aus i18n.language → templates resolven Sprache
- Account-Switch-Bug fix: signOut() resettet alle 10 user-spezifischen stores
  + invalidateMe()
2026-05-19 10:49:23 +02:00

56 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html lang="{{ if .Data.locale }}{{ .Data.locale }}{{ else }}en{{ end }}" dir="{{ if eq .Data.locale "ar" }}rtl{{ else }}ltr{{ end }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>ReBreak</title>
</head>
<body style="margin:0;padding:0;background:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#0a0a0a;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="center" style="padding:32px 16px;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width:480px;background:#ffffff;border-radius:16px;overflow:hidden;">
<tr><td align="center" style="padding:32px 24px 24px;background:#0a0a0a;">
<div style="color:#ffffff;font-size:26px;font-weight:700;letter-spacing:-0.5px;line-height:1;">Re<span style="color:#f59e0b;">B</span>reak</div>
</td></tr>
<tr><td style="padding:32px 24px;">
{{ if eq .Data.locale "de" }}
<h1 style="font-size:22px;font-weight:700;color:#0a0a0a;margin:0 0 12px;">Du wurdest zu ReBreak eingeladen</h1>
<p style="font-size:16px;line-height:24px;color:#525252;margin:0 0 24px;">Verwende diesen Code in der App, um deinen Account zu aktivieren:</p>
{{ else if eq .Data.locale "fr" }}
<h1 style="font-size:22px;font-weight:700;color:#0a0a0a;margin:0 0 12px;">Tu as été invité·e sur ReBreak</h1>
<p style="font-size:16px;line-height:24px;color:#525252;margin:0 0 24px;">Utilise ce code dans l'application pour activer ton compte :</p>
{{ else if eq .Data.locale "ar" }}
<h1 style="font-size:22px;font-weight:700;color:#0a0a0a;margin:0 0 12px;text-align:right;">تمت دعوتك إلى ReBreak</h1>
<p style="font-size:16px;line-height:24px;color:#525252;margin:0 0 24px;text-align:right;">استخدم هذا الرمز في التطبيق لتفعيل حسابك:</p>
{{ else }}
<h1 style="font-size:22px;font-weight:700;color:#0a0a0a;margin:0 0 12px;">You've been invited to ReBreak</h1>
<p style="font-size:16px;line-height:24px;color:#525252;margin:0 0 24px;">Use this code in the app to activate your account:</p>
{{ end }}
<div style="background:#fafafa;border:1px solid #e5e5e5;border-radius:12px;padding:24px 16px;text-align:center;margin:0 0 24px;">
<div style="font-size:36px;font-weight:700;letter-spacing:10px;color:#f59e0b;font-family:'SF Mono','Menlo','Courier New',monospace;line-height:1;">{{ .Token }}</div>
</div>
{{ if eq .Data.locale "de" }}
<p style="font-size:13px;line-height:20px;color:#a3a3a3;margin:0;">Falls du diese Einladung nicht erwartet hast, kannst du diese E-Mail ignorieren.</p>
{{ else if eq .Data.locale "fr" }}
<p style="font-size:13px;line-height:20px;color:#a3a3a3;margin:0;">Si tu n'attendais pas cette invitation, tu peux ignorer ce message.</p>
{{ else if eq .Data.locale "ar" }}
<p style="font-size:13px;line-height:20px;color:#a3a3a3;margin:0;text-align:right;">إذا لم تكن تتوقع هذه الدعوة، يمكنك تجاهل هذه الرسالة.</p>
{{ else }}
<p style="font-size:13px;line-height:20px;color:#a3a3a3;margin:0;">If you weren't expecting this invite, you can ignore this email.</p>
{{ end }}
</td></tr>
<tr><td align="center" style="padding:16px 24px 24px;background:#fafafa;border-top:1px solid #f0f0f0;">
<p style="font-size:11px;color:#a3a3a3;margin:0;">© ReBreak</p>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>