Moderation entfernt, JSON-API unter /api

- Moderationsseite und Melde-Funktion (report) komplett ausgebaut; folgt
  als eigenständiges Projekt
- alle API-Endpunkte unter /api, dort ausschließlich JSON: auch 404, 405,
  Rate-Limit (429) und Panics (500)
- Fehler nur über HTTP-Status; stille DB-Fehler in stats, logout und
  Vote-Zählern liefern jetzt 500 statt Nullen
- /auth/headerbar entfernt (Frontend nutzt /api/user/info)
- Frontend auf /api und statusbasierte Auswertung umgestellt
- notes/api.md neu als Referenz der aktuellen API

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TiXsPUqw7oeomZ8wZrQW5q
This commit is contained in:
irrlicht
2026-09-26 23:10:02 +02:00
co-authored by Claude Opus 5.5
parent 2714fdb1a5
commit 030a5bd943
21 changed files with 430 additions and 726 deletions
-46
View File
@@ -302,52 +302,6 @@ img.avatar-lg { width: 72px; height: 72px; }
.ghost.selected { font-weight: bold; }
.msg { color: red; }
/* Melden sitzt rechtsbündig in der Meta-Zeile (weit weg von den Interaktionen).
margin-left:auto schiebt es im Byline-Flex ganz nach rechts; position:relative
verankert das aufklappende Grund-Feld. Der <details>-Zweischritt (erst öffnen,
dann absenden) verhindert versehentliche Meldungen. */
details.report {
margin-left: auto;
position: relative;
font-size: 0.9rem;
}
/* summary wie ein Button, aber zurückhaltend (grau), da Moderationshilfe. */
details.report > summary {
list-style: none;
user-select: none;
cursor: pointer;
padding: 2px 8px;
border: 1px solid #ccc;
color: gray;
background-color: white;
}
details.report > summary::-webkit-details-marker { display: none; }
details.report > summary:hover { text-decoration: underline; }
details.report[open] > summary { color: #a00; border-color: #a00; }
details.report.reported > summary {
color: green;
border-color: green;
cursor: default;
text-decoration: none;
}
/* Aufgeklapptes Grund-Feld schwebt unter dem Button, damit die Meta-Zeile nicht
springt. Über dem Inhalt (z-index) und rechtsbündig ausgerichtet. */
.report-form {
position: absolute;
right: 0;
z-index: 2;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.25rem;
margin-top: 0.25rem;
padding: 0.5rem;
background-color: white;
border: 1px solid #ccc;
white-space: nowrap;
}
.report-form input { font-family: inherit; font-size: 0.9rem; }
p.warning {
background-color: #faa;
padding: 10px 15px;