Frontend: Registrierung angebunden (POST /auth/newuser)

- Umschalter Login <-> Registrieren im Auth-Bereich
- Fehlerlisten-Anzeige ({"errors": [...]}) fuer newuser
- nach erfolgreicher Registrierung automatischer Login
- Logout setzt Ansicht auf Login zurueck

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 11:47:00 +02:00
parent 2ab08ebf9a
commit a47f41bbfa
3 changed files with 55 additions and 5 deletions
+11
View File
@@ -21,7 +21,18 @@
<input name="pass" type="password" placeholder="Passwort" autocomplete="current-password">
<input name="timeout" type="hidden" value="86400">
<button type="submit">Einloggen</button>
<p class="switch">Noch kein Konto? <a href="#" id="show-register">Registrieren</a></p>
</form>
<form id="register-form" hidden>
<h2>Registrieren</h2>
<input name="user" placeholder="Nutzername" autocomplete="username">
<input name="pass1" type="password" placeholder="Passwort" autocomplete="new-password">
<input name="pass2" type="password" placeholder="Passwort wiederholen" autocomplete="new-password">
<button type="submit">Konto erstellen</button>
<p class="switch">Schon registriert? <a href="#" id="show-login">Zum Login</a></p>
</form>
<p class="msg" id="auth-msg"></p>
</section>