version 0.8.0

This commit is contained in:
danny 2026-09-18 06:46:56 +02:00
parent f22007003a
commit e5ca9ef194
95 changed files with 5601 additions and 4042 deletions

130
app/Views/pages/admin.php Normal file
View file

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<title>Admin – Black Sheep Bluff</title>
<link rel="icon" href="identity/favicon.png" type="image/png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Sora:wght@600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/assets/css/base.css">
<link rel="stylesheet" href="/assets/css/admin.css">
</head>
<body>
<div class="wrap">
<nav>
<a href="/" class="nav-logo"><img src="identity/favicon.png" style="width:22px;height:22px;vertical-align:middle;margin-right:7px;border-radius:6px">Black Sheep Bluff</a>
<div class="nav-links">
<a href="/play">Spiel</a>
<a href="/profile">Profil</a>
<a href="/admin" class="active">Admin</a>
<a href="#" onclick="Admin.logout()">Logout</a>
</div>
</nav>
<div id="errBox" class="err hidden"></div>
<div id="okBox" class="ok hidden"></div>
<!-- Zusammenfassung -->
<div class="card">
<h2><span class="dot"></span>Übersicht</h2>
<div class="sum-grid">
<div class="sum-box"><div class="v" id="sumUsers">–</div><div class="l">User</div></div>
<div class="sum-box"><div class="v" id="sumRounds">–</div><div class="l">Runden gespielt</div></div>
<div class="sum-box"><div class="v" id="sumNoPIN">–</div><div class="l">PIN fehlt noch</div></div>
</div>
</div>
<!-- Neuen User anlegen -->
<div class="card">
<h2><span class="dot"></span>Neuen User anlegen</h2>
<div class="inline-form">
<div class="field">
<label for="newUsername">Username</label>
<input id="newUsername" type="text" placeholder="z. B. lisa_m" maxlength="40"
autocomplete="off" onkeydown="if(event.key==='Enter')Admin.createUser()">
</div>
<button onclick="Admin.createUser()" style="margin-bottom:0">Anlegen</button>
</div>
<p class="hint" style="font-size:12px;color:var(--muted);margin-top:8px">
Der User legt beim ersten Login selbst einen PIN fest. Kein Passwort nötig.
</p>
</div>
<!-- User-Liste -->
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px">
<h2 style="margin:0"><span class="dot"></span>Alle User</h2>
<button class="ghost sm" onclick="Admin.loadUsers()">↻ Aktualisieren</button>
</div>
<div id="userTableWrap">
<p class="empty">Lade…</p>
</div>
</div>
<!-- Fake-Werbung (Joke) -->
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px">
<h2 style="margin:0"><span class="dot"></span>Fake-Werbung 🐑</h2>
<button class="ghost sm" onclick="Admin.loadAds()">↻ Aktualisieren</button>
</div>
<p class="hint" style="font-size:12px;color:var(--muted);margin:-6px 0 14px">
Reiner Joke-Banner (Skyscraper) am Spielrand. Z. B. „Premium-Wolle für 9,99€".
</p>
<label for="adImage">Bild-URL</label>
<input id="adImage" type="text" placeholder="https://…/banner.png" maxlength="500" autocomplete="off">
<label for="adTarget">Ziel-URL (optional)</label>
<input id="adTarget" type="text" placeholder="https://… (optional)" maxlength="500" autocomplete="off">
<button onclick="Admin.createAd()">Fake-Anzeige anlegen</button>
<div id="adListWrap" style="margin-top:16px"><p class="empty">Lade…</p></div>
</div>
<!-- Sounds -->
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px">
<h2 style="margin:0"><span class="dot"></span>Sounds 🔊</h2>
<button class="ghost sm" onclick="Admin.loadAssets()">↻ Aktualisieren</button>
</div>
<label for="soundLabel">Bezeichnung</label>
<input id="soundLabel" type="text" placeholder="z. B. 📢 Airhorn" maxlength="60" autocomplete="off">
<label for="soundFile">Audio-Datei (MP3 / OGG / WAV, max 1,5 MB)</label>
<input id="soundFile" type="file" accept="audio/mpeg,audio/ogg,audio/wav,.mp3,.ogg,.wav">
<button onclick="Admin.createSound()">Sound hochladen</button>
<div id="soundListWrap" style="margin-top:16px"><p class="empty">Lade…</p></div>
</div>
<!-- Reaktionen -->
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px">
<h2 style="margin:0"><span class="dot"></span>Reaktionen 😀</h2>
<button class="ghost sm" onclick="Admin.loadAssets()">↻ Aktualisieren</button>
</div>
<p class="hint" style="font-size:12px;color:var(--muted);margin:-6px 0 14px">Emoji eintippen <b>oder</b> ein Bild/GIF hochladen.</p>
<label for="reactionEmoji">Emoji</label>
<input id="reactionEmoji" type="text" placeholder="🐑" maxlength="8" autocomplete="off">
<label for="reactionImage">…oder Bild/GIF (PNG / GIF / JPEG / WebP, max 800 KB)</label>
<input id="reactionImage" type="file" accept="image/png,image/gif,image/jpeg,image/webp">
<button onclick="Admin.createReaction()">Reaktion anlegen</button>
<div id="reactionListWrap" style="margin-top:16px"><p class="empty">Lade…</p></div>
</div>
<!-- Globale Sticker -->
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px">
<h2 style="margin:0"><span class="dot"></span>Globale Sticker 🐑</h2>
<button class="ghost sm" onclick="Admin.loadAssets()">↻ Aktualisieren</button>
</div>
<label for="stickerLabel">Bezeichnung</label>
<input id="stickerLabel" type="text" placeholder="z. B. Party-Schaf" maxlength="60" autocomplete="off">
<label for="stickerImage">Bild/GIF (PNG / GIF / JPEG / WebP, max 800 KB)</label>
<input id="stickerImage" type="file" accept="image/png,image/gif,image/jpeg,image/webp">
<button onclick="Admin.createSticker()">Sticker hochladen</button>
<div id="stickerListWrap" style="margin-top:16px"><p class="empty">Lade…</p></div>
</div>
</div>
<script src="/assets/js/admin.js"></script>
</body>
</html>