Add the AirDef tablet web panel and battle archive (#153)

This commit is contained in:
2026-12-02 00:46:18 +03:00
parent dfb306edd7
commit 906159b17f
22 changed files with 2770 additions and 1 deletions
+114
View File
@@ -0,0 +1,114 @@
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#0b121a">
<title>Веб-пульт AirDef</title>
<link rel="stylesheet" href="./app.css">
<link rel="manifest" href="./manifest.webmanifest">
<link rel="apple-touch-icon" href="./icons/icon-192.png">
<link rel="icon" href="./icons/icon-192.png">
<script type="module" src="./app.js"></script>
</head>
<body>
<main class="shell">
<header class="topbar">
<div><h1>AirDef</h1><p>Командный пункт</p></div>
<div class="row">
<span id="connection" role="status">Подключение…</span>
<button id="install" type="button" hidden>Установить</button>
<button id="logout" type="button" hidden>Отвязать</button>
</div>
</header>
<section id="pairing" class="card pairing" hidden>
<h2>Подключить устройство</h2>
<form id="pair-form">
<label>Одноразовый код с ПК<input id="pair-code" type="password" maxlength="64" required autocomplete="off"></label>
<button type="submit">Подключить</button>
<p id="pair-error" class="error" role="alert"></p>
</form>
</section>
<section id="dashboard" hidden>
<nav class="tabs" aria-label="Разделы">
<button type="button" data-tab="live" aria-current="page">Карта</button>
<button type="button" data-tab="history">История</button>
<button type="button" data-tab="scenario">Сценарий</button>
</nav>
<div class="workspace">
<section id="map-panel" class="map-column" aria-label="Карта боя">
<div class="map-tools">
<label>Ракурс<select id="perspective">
<option value="network">Картина игрока</option>
<option value="enemy" hidden>Что известно противнику</option>
<option value="truth" hidden>Истина · песочница</option>
</select></label>
<button type="button" id="return-live" hidden>К прямому эфиру</button>
<div class="map-actions">
<button type="button" id="zoom-in" aria-label="Приблизить">+</button>
<button type="button" id="zoom-out" aria-label="Отдалить">−</button>
<button type="button" id="fit">Вся карта</button>
</div>
</div>
<div class="map-wrap"><canvas id="map" aria-label="Карта игровых объектов"></canvas></div>
<div class="card legend" id="layer-options">
<label><input type="checkbox" data-layer="units" checked> □ Техника</label>
<label><input type="checkbox" data-layer="objects" checked> ◇ Объекты</label>
<label><input type="checkbox" data-layer="contacts" checked> ○ Контакты</label>
<label><input type="checkbox" data-layer="interceptors" checked> ▵ Перехватчики</label>
</div>
<p id="map-status" role="status"></p>
</section>
<aside class="side-panel">
<section id="live-panel" class="card">
<div id="object-card" class="object-card" tabindex="-1"></div>
<label>Найти на карте<input id="object-search" type="search" autocomplete="off"></label>
<div id="object-list" class="list scroller" aria-label="Объекты на карте"></div>
</section>
<section id="history-panel" class="card" hidden>
<h2>История боя</h2>
<label>Налёт<select id="raid"></select></label>
<label>Момент повтора<input type="range" id="timeline" min="0" max="0" value="0" disabled></label>
<p id="timeline-caption" aria-live="polite" class="muted"></p>
<div class="fields">
<label>ID комплекса<input id="event-unit" type="number" min="0" inputmode="numeric"></label>
<label>ID контакта<input id="event-target" type="number" min="0" inputmode="numeric"></label>
<label>ID объекта<input id="event-object" type="number" min="1" inputmode="numeric"></label>
<label>От секунды<input id="event-since" type="number" min="0" inputmode="numeric" disabled></label>
<label>До секунды<input id="event-until" type="number" min="0" inputmode="numeric" disabled></label>
</div>
<label>Поиск в журнале<input id="event-query" type="search" autocomplete="off"></label>
<p id="history-status" role="status"></p>
<article id="event-card" class="subcard" hidden></article>
<div id="events" class="list scroller" aria-label="События боя"></div>
<button type="button" id="history-more" hidden>Более ранние</button>
</section>
<section id="scenario-panel" class="card" hidden>
<h2>Сценарий налёта</h2>
<form id="scenario-form">
<label>Готовый состав<select id="preset"></select></label>
<div class="fields">
<label>Подход<select id="approach"></select></label>
<label>Цель<select id="aim"></select></label>
<label>Расстояние, блоки<input id="distance" type="number" required inputmode="numeric"></label>
</div>
<div id="counts" class="fields"></div>
<p id="scenario-summary" role="status"></p>
<button id="preview" type="submit">Предпросмотр</button>
</form>
<p id="launch-status" role="status"></p>
</section>
</aside>
</div>
</section>
</main>
<dialog id="confirmation">
<h2>Подтвердить сценарий</h2>
<div id="preview-details"></div>
<div class="toolbar">
<button id="confirm-launch" type="button">Запустить</button>
<button id="cancel-launch" type="button">Назад</button>
</div>
</dialog>
</body>
</html>