UX-Paket: Navbar aufgeräumt, /server-Seite, Lightbox, Skeletons, Audit-Log, Reroll

- Navbar entschlackt: nur noch Devlog · Roadmap · Server · Community ·
  Setup; Galerie/Level/Events/Changelog im Community-Dropdown,
  Profil/Commits/Logout im Avatar-Menü; Mobile-Burger mit Drawer
- Öffentliche /server-Seite: Live-Status-Karten mit Spieler-Balken,
  Map, Connect-Button und 24h-Spielerzahl-Chart (SVG); Monitor sampelt
  jede Abfrage in player_history (7 Tage Retention), GET /api/servers
  liefert nur öffentliche Felder (keine Query-URLs/Hosts)
- Lightbox: Galerie- und Devlog-Bilder öffnen im Overlay mit
  Pfeiltasten, Buttons, Wisch-Gesten und Zähler statt neuem Tab
- Skeleton-Loader: schimmernde Platzhalter auf Devlogs, Roadmap,
  Galerie, Level, Changelog und Server statt "Lade …"
- Team-Audit-Log: audit_log-Tabelle (max 500 Einträge), Logging bei
  Settings/Composer/Vorlagen/Rollen-Menüs/Gameservern/Team/API-Keys/
  Branding, GET /api/auditlog (Owner) + Liste im Team-Tab
- Giveaway: 🔁 Reroll-Button (Admin-only) + 👥 Teilnehmerliste am
  Gewinner-Post

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-30 22:15:58 +02:00
co-authored by Claude Fable 5
parent 8d470ba26b
commit be11398f7c
17 changed files with 671 additions and 28 deletions
+20 -3
View File
@@ -1,5 +1,7 @@
import { useEffect, useState } from 'react';
import { apiGet } from '../api.js';
import Lightbox from '../components/Lightbox.jsx';
import { SkeletonGrid } from '../components/Skeleton.jsx';
const dateFmt = new Intl.DateTimeFormat('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' });
@@ -7,6 +9,7 @@ export default function Galerie() {
const [data, setData] = useState(null);
const [page, setPage] = useState(1);
const [error, setError] = useState(false);
const [lightbox, setLightbox] = useState(null); // Start-Index oder null
useEffect(() => {
setError(false);
@@ -33,12 +36,15 @@ export default function Galerie() {
<section className="content">
{error && <p className="notice">Galerie konnte nicht geladen werden.</p>}
{!error && !data && <p className="notice">Lade </p>}
{!error && !data && <SkeletonGrid n={9} />}
{data?.total === 0 && <p className="notice">Noch keine Screenshots poste welche im Discord!</p>}
<div className="gallery-grid">
{shots.map((s) => (
<a className="shot" href={s.src} target="_blank" rel="noreferrer" key={s.key}>
{shots.map((s, i) => (
<a
className="shot" href={s.src} key={s.key}
onClick={(e) => { e.preventDefault(); setLightbox(i); }}
>
<img src={s.src} alt={`Screenshot von ${s.author}`} loading="lazy" />
<span className="shot-meta">
<span className="shot-author">{s.author}</span>
@@ -48,6 +54,17 @@ export default function Galerie() {
))}
</div>
{lightbox !== null && (
<Lightbox
images={shots.map((s) => ({
src: s.src,
caption: `${s.author} · ${dateFmt.format(new Date(s.date))}`,
}))}
start={lightbox}
onClose={() => setLightbox(null)}
/>
)}
{pages > 1 && (
<div className="pager">
<button className="btn" disabled={page <= 1} onClick={() => setPage(page - 1)}>