Files
wibosim/server/public/pwa.css
T
db9979andClaude Opus 5.5 0c43810e42 WiBoSim als App: PWA mit Service Worker und Web Push (RFC 8291/8292)
- Service Worker (/sw.js, eigene Route mit no-cache und Service-Worker-Allowed), Offline-Seite,
  Manifest mit id, scope, start_url und Kurzbefehlen, iOS-Meta-Tags, Safe-Area im Standalone-Modus
- Web Push ohne neue Abhängigkeit: aes128gcm-Verschlüsselung und VAPID mit node:crypto,
  geprüft gegen die RFC-Testvektoren; VAPID-Schlüssel im Datenverzeichnis oder per Umgebung
- Abos je Spieler (bis 5 Geräte), Abo entfernen bei 404/410, Grenze je Stunde, Ruhezeiten,
  kein Push bei sichtbarem Tab, kurzer Inhalt mit Deep-Link; Versand über den Kanal „push“
- Einstellungen „Auf diesem Gerät“, iOS-Hinweis „Zum Home-Bildschirm“, Installationsknopf,
  App-Badge; Admin-Karte unter Betrieb; Datenschutz, Hilfe, Glossar und BETRIEB.md ergänzt
- Tests: RFC-Vektoren, Server-Modul, PWA-Auslieferung und Service Worker; lokaler Prüf-Push-Dienst

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUhQVoPUusUzxgxLWkK
2026-12-05 12:58:52 +00:00

49 lines
3.7 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ---------- Team App: WiBoSim als App (js/pwa.js) – Abschnitt „Auf diesem Gerät“, Hinweis „Zum Home-Bildschirm“,
Safe-Area-Ergänzungen für den Standalone-Modus (iPhone mit Notch/Dynamic Island und Home-Leiste). Eigene Datei,
damit das Zusammenführen mit style.css einfach bleibt. */
/* Abschnitt in Einstellungen → Benachrichtigungen */
.pwa-dev { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px);
background: color-mix(in srgb, var(--accent) 6%, var(--panel2)); }
.pwa-h { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: var(--fs-md, 16px); }
.pwa-dev p { margin: 4px 0 8px; }
.pwa-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; }
.pwa-on { display: flex; gap: 8px; align-items: flex-start; }
.pwa-on > .ico { color: var(--up); flex: none; margin-top: 2px; }
.pwa-on .block { display: block; margin-top: 2px; }
.pwa-msg { color: var(--info); }
.pwa-guide { margin-bottom: 0 !important; }
.pwa-steps { list-style: none; counter-reset: pwa; margin: 6px 0 8px; padding: 0; display: grid; gap: 6px; }
.pwa-steps li { counter-increment: pwa; display: grid; grid-template-columns: 22px 20px minmax(0, 1fr); gap: 6px; align-items: start; font-size: var(--fs-sm, 13px); }
.pwa-steps li::before { content: counter(pwa); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
background: var(--accent-fill); color: #fff; font-size: 11px; font-weight: 700; }
.pwa-steps .ico { margin-top: 1px; color: var(--accent); }
.pwa-devs { margin: 6px 0 4px; font-size: var(--fs-sm, 13px); }
.pwa-devs summary { cursor: pointer; color: var(--muted); }
.pwa-devs ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pwa-devs li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.pwa-devs li small { display: block; }
/* einmaliger Hinweis „WiBoSim als App“ */
.pwa-hint { position: fixed; z-index: 81; right: max(16px, var(--safe-r)); bottom: max(16px, var(--safe-b)); width: min(390px, calc(100vw - 32px));
display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 14px 12px 12px 14px;
background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--r-lg, 14px);
box-shadow: 0 14px 40px var(--shadow-lg); animation: pwa-in .25s ease-out; }
.pwa-hint-art { width: 52px; height: 52px; }
.pwa-hint-b b { font-size: var(--fs-md, 16px); }
.pwa-hint-b p { margin: 4px 0 6px; }
.pwa-hint-x { position: static; }
@keyframes pwa-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pwa-hint { animation: none; } }
@media (max-width: 760px) {
.pwa-hint { left: max(8px, var(--safe-l)); right: max(8px, var(--safe-r)); width: auto; bottom: calc(64px + var(--safe-b)); grid-template-columns: 40px minmax(0, 1fr) auto; }
.pwa-hint-art { width: 40px; height: 40px; }
}
/* Home-Bildschirm-App (Klasse pwa-standalone von js/pwa.js): Kopf und untere Leiste halten schon Abstand zur Notch bzw.
Home-Leiste (--safe-t/--safe-b in style.css). Die iOS-Statusleiste ist „black-translucent“ (weiße Schrift über dem
Kopf) – im hellen Schema bekommt der Bereich dahinter einen dunklen Streifen, damit Uhrzeit und Akku lesbar bleiben. */
:root.pwa-standalone[data-theme="light"] header.top { background: linear-gradient(to bottom, #141b2b 0, #141b2b var(--safe-t), var(--panel) var(--safe-t)); }
@media print { .pwa-hint, .pwa-dev { display: none !important; } }