Feature: E-Mail-Verifikation + Forum öffentlich lesbar + Launch-Vorbereitung
- Forum ohne requiresAuth: öffentlich lesbar, Schreiben weiter via API-Guard
- E-Mail-Verifikation: Token bei Registrierung, support@-Mail, /verify-email/{token}
- Verifikations-Banner (orange, dismissible) wenn email_verified=0
- Grüner Haken / "Nicht bestätigt"-Chip in Settings
- POST /auth/resend-verification für Chip und Banner
- DB-Migration: users.verification_token TEXT
- SW by-v575, APP_VER 552
This commit is contained in:
parent
e79290edb7
commit
b9ee67b8dd
7 changed files with 137 additions and 11 deletions
|
|
@ -138,7 +138,15 @@ window.Page_settings = (() => {
|
|||
style="display:none">
|
||||
<div>
|
||||
<div style="font-weight:700;font-size:var(--text-lg)">${_esc(u.name)}</div>
|
||||
<div style="color:var(--c-text-secondary);font-size:var(--text-sm)">${_esc(u.email)}</div>
|
||||
<div style="display:flex;align-items:center;gap:var(--space-2);color:var(--c-text-secondary);font-size:var(--text-sm)">
|
||||
${_esc(u.email)}
|
||||
${u.email_verified
|
||||
? `<svg class="ph-icon" aria-hidden="true" style="width:14px;height:14px;color:#22c55e" title="Bestätigt"><use href="/icons/phosphor.svg#check-circle"></use></svg>`
|
||||
: `<span id="settings-verify-chip"
|
||||
style="font-size:10px;background:#fef3c7;color:#d97706;padding:1px 7px;
|
||||
border-radius:999px;cursor:pointer;white-space:nowrap"
|
||||
title="E-Mail noch nicht bestätigt">Nicht bestätigt</span>`}
|
||||
</div>
|
||||
<div style="display:flex;flex-wrap:wrap;gap:var(--space-1);margin-top:var(--space-1)">
|
||||
${u.is_premium
|
||||
? `<span class="badge badge-primary">
|
||||
|
|
@ -480,6 +488,12 @@ window.Page_settings = (() => {
|
|||
});
|
||||
|
||||
// Avatar-Hover-Overlay
|
||||
// E-Mail-Verifikation: Chip → erneut senden
|
||||
document.getElementById('settings-verify-chip')?.addEventListener('click', async () => {
|
||||
await API.post('/auth/resend-verification', {});
|
||||
UI.toast.success('Bestätigungs-Mail gesendet — bitte prüfe dein Postfach.');
|
||||
});
|
||||
|
||||
const avatarBtn = document.getElementById('settings-avatar-btn');
|
||||
const avatarOverlay = avatarBtn?.querySelector('.avatar-overlay');
|
||||
if (avatarBtn && avatarOverlay) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue