Add voice buttons, Wi-Fi netconfig, and demo STT server

This commit is contained in:
2026-08-27 00:40:19 +03:00
parent 32abb8bf0a
commit d4886a6a75
57 changed files with 3802 additions and 270 deletions
@@ -234,7 +234,7 @@
<section class="panel" id="tab-network">
<div class="card">
<div class="card-head">
<h2>Ethernet</h2>
<h2>Сеть (Ethernet / WiFi)</h2>
<button id="net-refresh" class="ghost">↻ Обновить</button>
</div>
<div id="net-status" class="net-status">Загрузка состояния…</div>
@@ -253,6 +253,12 @@
<option value="static">Статический IP</option>
</select>
</label>
<label class="wifi-only">SSID WiFi
<input type="text" id="net-ssid" placeholder="Имя сети" maxlength="32">
</label>
<label class="wifi-only">Пароль WiFi
<input type="password" id="net-password" placeholder="Пустой = открытая сеть">
</label>
<label class="static-only">IP-адрес <input type="text" id="net-address" placeholder="192.168.1.50"></label>
<label class="static-only">Маска (префикс) <input type="number" id="net-prefix" min="1" max="32" value="24"></label>
<label class="static-only">Шлюз <input type="text" id="net-gateway" placeholder="192.168.1.1"></label>
@@ -425,6 +431,12 @@
<h3 id="btn-dialog-title">Кнопка</h3>
<input type="hidden" id="b-id">
<label>Подпись <input type="text" id="b-label" required></label>
<label>Тип кнопки
<select id="b-kind">
<option value="press">Нажатие</option>
<option value="voice">Голос (запись)</option>
</select>
</label>
<label>Иконка
<select id="b-icon">
<option value="">— нет —</option>
@@ -433,17 +445,27 @@
{% endfor %}
</select>
</label>
<label>Метод
<label id="b-type-row">Метод
<select id="b-type">
<option value="http_get">http_get</option>
<option value="http_post">http_post</option>
</select>
</label>
<label>URL <input type="text" id="b-url" required></label>
<label>URL <input type="text" id="b-url" required placeholder="http://host/api/..."></label>
<label>Ожидание ответа, мс
<input type="number" id="b-action-timeout" min="1000" max="600000" step="500" value="7000">
</label>
<p class="hint b-action-timeout-hint">Таймаут одного HTTP-запроса. По умолчанию 7000 мс (7 с). При «Мгновенном отклике» влияет только на фоновый запрос и лог.</p>
<p class="hint b-action-timeout-hint">Таймаут одного HTTP-запроса. Для голоса обычно 60000.</p>
<div class="voice-block" id="b-voice-block" style="display:none">
<label>URL отмены (cancel) <input type="text" id="b-cancel-url" placeholder="http://host/api/v1/cancel"></label>
<label>source_id <input type="text" id="b-source-id" placeholder="panel-01"></label>
<label>X-API-Key <input type="password" id="b-api-key" placeholder="ключ API сервера" autocomplete="off"></label>
<label>Макс. запись, мс
<input type="number" id="b-max-record" min="1000" max="120000" step="1000" value="30000">
</label>
<p class="hint">Удержание: запись пока зажата. Клик: старт/стоп. Повторное нажатие на горящей кнопке — отмена на cancel URL. Ключ уходит в заголовке X-API-Key.</p>
</div>
<div class="latch-reset-block" id="b-latch-block">
<label class="check">
@@ -466,7 +488,7 @@
<label>Текст ошибки <input type="text" id="b-error" value="Ошибка"></label>
<label>Текст ожидания <input type="text" id="b-pending" value="..."></label>
<label>Цвет кнопки <input type="color" id="b-color" value="#7b007b"></label>
<label>Срабатывание
<label id="b-trigger-label">Срабатывание
<select id="b-trigger-mode">
<option value="hold">Удержание</option>
<option value="click">Клик</option>