diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 1f9c1b8..41e2392 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -73,15 +73,18 @@ function AdminPanel() { -
+
Vorhandene User
+
{users.map((u) => (
-
{u.email}
-
{u.role}
-
+
{u.email}
+
+ {u.role} +
+
{u.disabled ? "disabled" : "active"}
@@ -90,19 +93,12 @@ function AdminPanel() { {open && (
-
e.stopPropagation()} - > +
e.stopPropagation()}>
-
+
Neuen User anlegen
-
@@ -122,25 +118,14 @@ function AdminPanel() { type="password" style={styles.input} /> - setRole(e.target.value)} style={styles.input}> - {msg &&
{msg}
} + {msg &&
{msg}
} -
+
-
+
Tipp: Klick auf Item: Grün → Rot → Grau → Leer
@@ -189,7 +174,7 @@ export default function App() { if (gs[0] && !gameId) setGameId(gs[0].id); }; - // ✅ Google Fonts laden + // Google Fonts useEffect(() => { if (document.getElementById("hp-fonts")) return; @@ -208,14 +193,14 @@ export default function App() { link.id = "hp-fonts"; link.rel = "stylesheet"; link.href = - "https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=IM+Fell+English:ital,wght@0,400;0,0.700;1,400&display=swap"; + "https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=IM+Fell+English:ital,wght@0,400;0,700;1,400&display=swap"; document.head.appendChild(pre1); document.head.appendChild(pre2); document.head.appendChild(link); }, []); - // ✅ Keyframes + // Keyframes useEffect(() => { if (document.getElementById("hp-anim-style")) return; const style = document.createElement("style"); @@ -235,7 +220,7 @@ export default function App() { document.head.appendChild(style); }, []); - // ✅ html/body reset + // html/body reset useEffect(() => { document.documentElement.style.height = "100%"; document.body.style.height = "100%"; @@ -245,7 +230,7 @@ export default function App() { document.body.style.padding = "0"; }, []); - // ✅ Global CSS (Hover komplett weg + sauberes Scroll-Verhalten) + // Global CSS: Dark + Gold base useEffect(() => { if (document.getElementById("hp-global-style")) return; const style = document.createElement("style"); @@ -257,46 +242,19 @@ export default function App() { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - background: #1c140d; + background: ${stylesTokens.pageBg}; + color: ${stylesTokens.textMain}; } body { overflow-x: hidden; - // touch-action: pan-y; -webkit-overflow-scrolling: touch; } #root { background: transparent; } - /* - .hp-row:hover, - .hp-row:active, - .hp-row:focus, - .hp-row:focus-within { - background: inherit !important; - filter: none !important; - box-shadow: none !important; - outline: none !important; - } - - .hp-row *:hover, - .hp-row *:active, - .hp-row *:focus { - filter: none !important; - box-shadow: none !important; - outline: none !important; - } - .hp-row, .hp-row * { - -webkit-tap-highlight-color: transparent !important; - -webkit-touch-callout: none; - } - button:hover, - button:active, - button:focus { - filter: none !important; - box-shadow: none !important; - outline: none !important; - }*/ + /* Safari/Chrome tap highlight reduzieren (kein hover/flash) */ + * { -webkit-tap-highlight-color: transparent; } `; document.head.appendChild(style); }, []); @@ -382,6 +340,38 @@ export default function App() { await reloadSheet(); }; + // --- helpers --- + const getRowBg = (status) => { + if (status === 1) return "rgba(255, 35, 35, 0.16)"; + if (status === 2) return "rgba(0, 190, 80, 0.16)"; + if (status === 3) return "rgba(140, 140, 140, 0.12)"; + return "rgba(255,255,255,0.06)"; + }; + + const getNameColor = (status) => { + if (status === 1) return "#ffb3b3"; + if (status === 2) return "#baf3c9"; + if (status === 3) return "rgba(233,216,166,0.78)"; + return stylesTokens.textMain; + }; + + const getStatusSymbol = (status) => { + if (status === 2) return "✓"; + if (status === 1) return "✕"; + if (status === 3) return "?"; + return "–"; + }; + + const getStatusBadge = (status) => { + if (status === 2) return { color: "#baf3c9", background: "rgba(0,190,80,0.18)" }; + if (status === 1) return { color: "#ffb3b3", background: "rgba(255,35,35,0.18)" }; + if (status === 3) return { color: "rgba(233,216,166,0.85)", background: "rgba(140,140,140,0.14)" }; + return { color: "rgba(233,216,166,0.75)", background: "rgba(255,255,255,0.08)" }; + }; + + const closeHelp = () => setHelpOpen(false); + + // ===== Login ===== if (!me) { return (
@@ -438,62 +428,22 @@ export default function App() {
- Deine Notizen bleiben privat – jeder Spieler sieht nur seinen eigenen - Zettel. + Deine Notizen bleiben privat – jeder Spieler sieht nur seinen eigenen Zettel.
); } + // ===== Main ===== const sections = sheet ? [ - { - key: "suspect", - title: "VERDÄCHTIGE PERSON", - entries: sheet.suspect || [], - }, + { key: "suspect", title: "VERDÄCHTIGE PERSON", entries: sheet.suspect || [] }, { key: "item", title: "GEGENSTAND", entries: sheet.item || [] }, { key: "location", title: "ORT", entries: sheet.location || [] }, ] : []; - const getRowBg = (status) => { - if (status === 1) return "rgba(255, 35, 35, 0.16)"; // rot kräftiger - if (status === 2) return "rgba(0, 190, 80, 0.16)"; // grün kräftiger - if (status === 3) return "rgba(80, 80, 80, 0.18)"; // grau kräftiger - return "rgba(255,255,255,0.14)"; // neutral - }; - - const getNameColor = (status) => { - if (status === 1) return "#9f0f0f"; - if (status === 2) return "#0b6a1e"; - if (status === 3) return "#3f3f3f"; - return "#20140c"; - }; - - const getStatusSymbol = (status) => { - if (status === 2) return "✓"; - if (status === 1) return "✕"; - if (status === 3) return "?"; - return "–"; - }; - - const getStatusBadge = (status) => { - if (status === 2) - return { color: "#0b6a1e", background: "rgba(0,170,60,0.10)" }; - if (status === 1) - return { color: "#b10000", background: "rgba(255,0,0,0.10)" }; - if (status === 3) - return { color: "#444444", background: "rgba(120,120,120,0.12)" }; - return { - color: "rgba(30,20,12,0.60)", - background: "rgba(255,255,255,0.26)", - }; - }; - - const closeHelp = () => setHelpOpen(false); - return (