LuminaWebsite/assets/map/index.html
Maaxxs df656209c9 Map tactics live: strokes appear for everyone while they are drawn, several people can draw at once
- Whoever has a tactic open sees the strokes of the others while they are being drawn (with the
  name at the pen tip); saved and erased shapes appear at once, and after changes to steps or the
  tactic the map reloads by itself. Several people can draw in parallel, also in the same step.
- The panel shows who is in the tactic (a click jumps to their step), dots in the step list show
  who is where and blink while someone draws there; the step bar shows "✏️ Name" for the shown step.
- The Discord bot relays it (live_tactics.py in the bot repo, only in memory): tactics_api.php
  issues a ticket (action live_token: account, display name, tactic, may draw, 30 minutes, signed
  with raids_api.key via HMAC-SHA256, tactic_live_ticket() in includes/tactics.php). The browser
  receives via Server-Sent Events and sends batched strokes (at most every 70 ms), saved/removed
  shapes, changes and its own step via POST (assets/map/js/services/TacticLiveService.js).
  Only who may edit the tactic may draw live. Saving still happens only on the website.
- On a lost connection the panel says so, the map reconnects with a fresh ticket (backoff up to
  15 s), reloads the tactic and hands in what was drawn meanwhile. Reloads triggered by the live
  view keep the current state on network errors instead of closing the tactic.
- Optional config raids_api.live_url for a public bot address that differs from raids_api.url.
- Privacy policy (live view: direct connection to the bot server, what others see, nothing stored),
  patch notes and README updated.

Needs the matching bot update (live_tactics.py, api.py, main.py), deployed on 2026-09-25.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:16:19 +02:00

189 lines
No EOL
10 KiB
HTML
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.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Aion 2 – Interaktive Karte</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Main map container -->
<div id="map-container">
<canvas id="map-canvas"></canvas>
<!-- Loading overlay -->
<div id="loading-overlay" class="hidden">
<div class="spinner"></div>
<p>Karte wird geladen …</p>
</div>
<!-- UI Overlay -->
<div id="ui-overlay">
<!-- Kartenwahl: Knopf mit aktueller Karte, oeffnet die Auswahl mit Vorschaubildern -->
<header id="title-bar" class="panel">
<button type="button" id="map-picker-btn" aria-haspopup="dialog" title="Karte wechseln">
<span class="map-picker-label">Karte</span>
<strong id="map-current-name">Lädt …</strong>
<span class="map-picker-chevron" aria-hidden="true">▾</span>
</button>
<div id="map-unavailable" class="hidden">⚠️ Diese Karte ist auf unserem Patch noch nicht verfügbar.</div>
</header>
<!-- Zoom controls -->
<aside id="zoom-controls" class="panel">
<button id="btn-toggle-ui" title="Fenster aus-/einblenden (H)" aria-pressed="false">👁</button>
<button id="btn-zoom-in" title="Hineinzoomen (+)">+</button>
<button id="btn-zoom-out" title="Herauszoomen (-)">−</button>
<button id="btn-reset-view" title="Ansicht zurücksetzen (0)">⟲</button>
</aside>
<!-- Category filter panel -->
<aside id="category-panel" class="panel">
<div class="tp-head">
<button type="button" class="tp-collapse" id="cp-collapse" title="Ein-/Ausklappen" aria-expanded="true">▾</button>
<h3>Kategorien</h3>
</div>
<div class="cp-body">
<div class="category-bulk">
<button type="button" id="btn-show-all">Alle anzeigen</button>
<button type="button" id="btn-hide-all">Alle verstecken</button>
</div>
<div id="categories-list"></div>
</div>
</aside>
<!-- Taktiken: Liste, Schritte der gewaehlten Taktik -->
<aside id="tactic-panel" class="panel hidden">
<div class="tp-head">
<button type="button" class="tp-collapse" id="tp-collapse" title="Ein-/Ausklappen" aria-expanded="true">▾</button>
<h3>Taktiken</h3>
<!-- Papierkorb: nur sichtbar, wenn es hier etwas gibt, das man wiederherstellen darf -->
<button type="button" class="tp-btn hidden" id="tp-trash" title="Gelöschte Taktiken wiederherstellen">Gelöschte</button>
<button type="button" class="tp-btn hidden" id="tp-new">+ Neu</button>
</div>
<!-- Zeichenwerkzeuge (eigene Taktiken; fremde oeffentliche mit map.tactics, offizielle mit map.tactics.highlight) -->
<div id="tactic-toolbar" class="hidden">
<button type="button" class="tool active" data-tool="pan" title="Karte verschieben (Esc)">✋</button>
<button type="button" class="tool" data-tool="pen" title="Stift: frei zeichnen">✏️</button>
<button type="button" class="tool" data-tool="arrow" title="Pfeil: ziehen">➜</button>
<button type="button" class="tool" data-tool="line" title="Linie: ziehen">╱</button>
<button type="button" class="tool" data-tool="area" title="Fläche: Eckpunkte klicken, Doppelklick oder Enter schließt ab">⬠</button>
<button type="button" class="tool" data-tool="circle" title="Kreis: von der Mitte aus ziehen">◯</button>
<button type="button" class="tool" data-tool="point" title="Punkt mit Beschriftung setzen">📍</button>
<button type="button" class="tool" data-tool="text" title="Text setzen">T</button>
<button type="button" class="tool" data-tool="eraser" title="Radierer: Zeichnung anklicken">⌫</button>
<button type="button" class="tool" id="tool-undo" title="Letzte eigene Zeichnung in diesem Schritt entfernen (Strg+Z)">↶</button>
<input type="color" id="tool-color" value="#ffd700" title="Farbe">
<select id="tool-width" title="Strichstärke">
<option value="2">dünn</option>
<option value="4" selected>mittel</option>
<option value="7">dick</option>
<option value="12">sehr dick</option>
</select>
</div>
<div class="tp-body" id="tp-body">
<div id="tp-list"></div>
<p class="tp-message hidden" id="tp-message"></p>
<div class="tp-detail hidden" id="tp-detail">
<div class="tp-detail-head">
<strong id="tp-name"></strong>
<span class="tp-head-tools">
<!-- Kopieren darf jeder, der die Taktik sieht -->
<button type="button" class="tp-icon" id="tp-copy" title="Ganze Taktik als eigene Kopie anlegen">⧉</button>
<span class="tp-edit-only">
<button type="button" class="tp-icon" id="tp-history" title="Verlauf: früheren Stand wiederherstellen">🕘</button>
<button type="button" class="tp-icon" id="tp-edit" title="Taktik umbenennen/beschreiben">✎</button>
<button type="button" class="tp-icon tp-danger" id="tp-delete" title="Taktik löschen">🗑</button>
</span>
</span>
</div>
<p class="tp-meta" id="tp-meta"></p>
<!-- Live-Ansicht: wer gerade in dieser Taktik ist (Klick springt in dessen Schritt) -->
<div class="tp-live hidden" id="tp-live" aria-live="polite"></div>
<label class="tp-highlight hidden" id="tp-highlight">
Hervorhebung
<select id="tp-highlight-select">
<option value="none">keine</option>
<option value="recommended">👍 Empfohlen</option>
<option value="official">★ Offiziell</option>
</select>
</label>
<p class="tp-desc" id="tp-desc"></p>
<h4>Schritte</h4>
<ol class="tp-steps" id="tp-steps"></ol>
<div class="tp-step-actions tp-edit-only">
<button type="button" class="tp-btn" id="tp-step-add" title="Leeren Schritt am Ende anlegen">+ Schritt</button>
<button type="button" class="tp-btn" id="tp-step-copy" title="Neuen Schritt mit den Zeichnungen des aktuellen Schritts anlegen">+ Kopie dieses Schritts</button>
</div>
<label class="tp-check">
<input type="checkbox" id="tp-ghosts">
Vorherige Schritte blass zeigen
</label>
</div>
</div>
</aside>
<!-- Schritt-Leiste der gewaehlten Taktik -->
<div id="step-bar" class="panel hidden">
<button type="button" id="sb-prev" title="Vorheriger Schritt (←)">◀</button>
<div class="sb-text">
<div class="sb-title" id="sb-title"></div>
<div class="sb-live hidden" id="sb-live"></div>
<div class="sb-desc" id="sb-desc"></div>
</div>
<button type="button" id="sb-next" title="Nächster Schritt (→)">▶</button>
</div>
<!-- Zoom level indicator -->
<footer id="zoom-indicator" class="panel">
Zoom: <span id="zoom-level">2</span>
</footer>
</div>
<!-- Tooltip for marker hover -->
<div id="tooltip" class="hidden">
<div class="name"></div>
<div class="category"></div>
</div>
<!-- Kartenauswahl mit Vorschaubildern (data/previews, nur die Karte ohne Markierungen) -->
<div id="map-picker" class="hidden" role="dialog" aria-modal="true" aria-labelledby="map-picker-title">
<div class="map-picker-panel panel">
<div class="map-picker-head">
<h2 id="map-picker-title">Karte wählen</h2>
<button type="button" id="map-picker-close" aria-label="Schließen">✕</button>
</div>
<div id="map-picker-list"></div>
</div>
</div>
<!-- Eingabedialog fuer Namen, Beschreibungen und Beschriftungen -->
<div id="tactic-dialog" class="hidden">
<form class="panel" id="td-form">
<h3 id="td-title"></h3>
<div id="td-fields"></div>
<div class="td-actions">
<button type="submit" id="td-submit">Speichern</button>
<button type="button" id="td-cancel">Abbrechen</button>
</div>
</form>
</div>
<div id="toast" class="hidden"></div>
</div>
<!-- Application scripts -->
<script src="js/config.js"></script>
<script src="js/models/MapData.js"></script>
<script src="js/services/TileService.js"></script>
<script src="js/services/MarkerService.js"></script>
<script src="js/views/MapView.js"></script>
<script src="js/controllers/MapController.js"></script>
<script src="js/services/TacticService.js"></script>
<script src="js/services/TacticLiveService.js"></script>
<script src="js/views/TacticLayer.js"></script>
<script src="js/controllers/TacticController.js"></script>
<script src="js/controllers/LocationController.js"></script>
<script src="app.js"></script>
</body>
</html>