caps_enhancer/options.html

271 lines
18 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CAPS Enhancer - Настройки</title>
<link rel="stylesheet" href="css/options.css">
</head>
<body>
<div class="container">
<header>
<div class="header-content">
<img src="icons/icon128.png" alt="CAPS Enhancer" class="header-logo" onerror="this.style.display='none'">
<div>
<h1 data-i18n="options.headerTitle">⚙️ Настройки CAPS Enhancer</h1>
<p class="subtitle" data-i18n="options.headerSubtitle">Настройте расширение под свои нужды</p>
</div>
</div>
</header>
<div class="content">
<div class="settings-grid">
<div class="settings-col">
<!-- Настройки видео-окна -->
<section class="settings-section">
<h2 data-i18n="options.videoWindowTitle">🎬 Видео окна</h2>
<div class="setting-item">
<label for="video-ip-button-mode">
<span class="label-text" data-i18n="options.videoIpButtonModeLabel">Режим кнопки с IP-адресом</span>
<span class="label-description" data-i18n="options.videoIpButtonModeDesc">Как отображать ссылку на настройки устройства в заголовке видео-окна</span>
</label>
<select id="video-ip-button-mode">
<option value="button" data-i18n="options.videoIpButtonModeButton">Кнопка с IP-адресом (🔗 IP:порт)</option>
<option value="clickable-title" data-i18n="options.videoIpButtonModeClickable">Кнопка «Лещ» (без IP-адреса)</option>
</select>
</div>
</section>
<!-- Настройки noVNC (страница экрана) -->
<section class="settings-section">
<h2 data-i18n="options.novncTitle">🖥️ Страница экрана</h2>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.novncRedirectLabel">Включить переадресацию</span>
<span class="label-description" data-i18n="options.novncRedirectDesc">Автоматически перенаправлять со страницы экрана на настройки (порт видео)</span>
<label class="switch">
<input type="checkbox" id="novnc-redirect">
<span class="slider"></span>
</label>
</label>
</div>
<div class="setting-item inline" id="redirect-delay-container">
<label for="redirect-delay">
<span class="label-text" data-i18n="options.novncDelayLabel">Задержка (мс)</span>
</label>
<input type="number" id="redirect-delay" data-i18n-placeholder="options.novncDelayPlaceholder" placeholder="500" min="0" max="5000" step="100">
</div>
<div class="setting-item inline">
<label for="port-video">
<span class="label-text" data-i18n="options.novncPortLabel">Порт для перехода (настройки)</span>
</label>
<input type="text" id="port-video" data-i18n-placeholder="options.novncPortPlaceholder" placeholder="5000" maxlength="5">
</div>
</section>
<!-- Настройки кнопки "Мнемосхема" -->
<section class="settings-section">
<h2 data-i18n="options.mnemoTitle">📍 Мнемосхема</h2>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.mnemoAddSchemeButtonLabel">Добавлять кнопку «Мнемосхема»</span>
<span class="label-description" data-i18n="options.mnemoAddSchemeButtonDesc">Показывать кнопку перехода на мнемосхему на главной странице</span>
<label class="switch">
<input type="checkbox" id="mnemo-add-scheme-button">
<span class="slider"></span>
</label>
</label>
</div>
<div class="setting-item">
<label for="mnemo-mode">
<span class="label-text" data-i18n="options.mnemoModeLabel">Режим перехода</span>
<span class="label-description" data-i18n="options.mnemoModeDesc">Куда ведёт кнопка «Мнемосхема»</span>
</label>
<select id="mnemo-mode">
<option value="host-port" data-i18n="options.mnemoModeHostPort">host:порт</option>
<option value="host-scheme" data-i18n="options.mnemoModeHostScheme">host/scheme</option>
</select>
</div>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.mnemoAddVideoButtonLabel">Добавлять кнопку «Лещ»</span>
<span class="label-description" data-i18n="options.mnemoAddVideoButtonDesc">Кнопка перехода на host:порт видео (настройки) рядом с «Мнемосхема»</span>
<label class="switch">
<input type="checkbox" id="mnemo-add-video-button">
<span class="slider"></span>
</label>
</label>
</div>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.mnemoSkipOnDomainLabel">Не добавлять кнопку при заходе по домену</span>
<span class="label-description" data-i18n="options.mnemoSkipOnDomainDesc">Если заходите по имени домена, а не по IP — кнопку не показывать</span>
<label class="switch">
<input type="checkbox" id="mnemo-skip-on-domain">
<span class="slider"></span>
</label>
</label>
</div>
<div class="setting-item inline">
<label for="port-scheme">
<span class="label-text" data-i18n="options.mnemoPortLabel">Порт мнемосхемы</span>
</label>
<input type="text" id="port-scheme" data-i18n-placeholder="options.mnemoPortPlaceholder" placeholder="8080" maxlength="5">
</div>
</section>
<!-- Замена логотипа и видимость UI -->
<section class="settings-section">
<h2 data-i18n="options.appearanceTitle">🖼️ Внешний вид</h2>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.replaceLogoLabel">Заменять логотип CleverPark на иконку CAPS</span>
<span class="label-description" data-i18n="options.replaceLogoDesc"></span>
<label class="switch">
<input type="checkbox" id="replace-logo">
<span class="slider"></span>
</label>
</label>
</div>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.appearanceUiVisibleLabel">Показывать улучшения расширения</span>
<span class="label-description" data-i18n="options.appearanceUiVisibleDesc">Кнопки, замена логотипа. Можно также переключить через Shift+F1</span>
<label class="switch">
<input type="checkbox" id="ui-visible">
<span class="slider"></span>
</label>
</label>
</div>
</section>
<!-- Настройки автологина -->
<section class="settings-section">
<h2 data-i18n="options.autologinTitle">🔐 Автологин</h2>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.autologinEnabledLabel">Включить автозаполнение</span>
<span class="label-description" data-i18n="options.autologinEnabledDesc">Автоматически заполнять логин и пароль на странице входа</span>
<label class="switch">
<input type="checkbox" id="autologin-enabled">
<span class="slider"></span>
</label>
</label>
</div>
<div id="autologin-settings" class="sub-settings">
<!-- Назначение профилей на типы страниц -->
<div class="setting-item">
<label for="autologin-page1-profile">
<span class="label-text" data-i18n="options.autologinPage1ProfileLabel">Профиль для страницы входа (тип 1, порт 5000)</span>
</label>
<select id="autologin-page1-profile"></select>
</div>
<div class="setting-item">
<label for="autologin-page2-profile">
<span class="label-text" data-i18n="options.autologinPage2ProfileLabel">Профиль для страницы входа (тип 2, auth-logo)</span>
</label>
<select id="autologin-page2-profile"></select>
</div>
<!-- Динамический список профилей -->
<h3 data-i18n="options.autologinProfilesTitle">Профили учётных данных</h3>
<div id="autologin-profiles-list"></div>
<button type="button" id="autologin-add-profile" class="btn btn-secondary" style="margin-top:6px;padding:6px 12px;font-size:13px;" data-i18n="options.autologinAddProfile"> Добавить профиль</button>
<!-- Правила подсетей -->
<h3 style="margin-top:16px;" data-i18n="options.autologinSubnetRulesTitle">Правила для подсетей</h3>
<p style="font-size:12px;color:#888;margin-bottom:8px;" data-i18n="options.autologinSubnetRulesDesc">При совпадении хоста с подсетью — пропустить или использовать другой профиль</p>
<div id="autologin-subnet-rules"></div>
<button type="button" id="autologin-add-subnet-rule" class="btn btn-secondary" style="margin-top:6px;padding:6px 12px;font-size:13px;" data-i18n="options.autologinAddSubnetRule"> Добавить правило</button>
</div>
</section>
</div>
<div class="settings-col secondary">
<!-- Настройки отладки -->
<section class="settings-section">
<h2 data-i18n="options.debugTitle">🐛 Отладка</h2>
<div class="setting-item">
<label class="switch-label">
<span class="label-text" data-i18n="options.debugEnabledLabel">Включить логи в консоль</span>
<span class="label-description" data-i18n="options.debugEnabledDesc">Показывать отладочные сообщения</span>
<label class="switch">
<input type="checkbox" id="debug-enabled">
<span class="slider"></span>
</label>
</label>
</div>
<div id="debug-modules" class="sub-settings">
<h3 data-i18n="options.debugModulesTitle">Модули для отладки</h3>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-core" class="debug-module">
<span data-i18n="options.debugCore">🟢 Core (ядро)</span>
</label>
</div>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-video" class="debug-module">
<span data-i18n="options.debugVideo">🔵 Video (видео окна)</span>
</label>
</div>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-mnemo" class="debug-module">
<span data-i18n="options.debugMnemo">🟠 Mnemo (мнемосхема)</span>
</label>
</div>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-close" class="debug-module">
<span data-i18n="options.debugClose">🔴 Close (закрытие)</span>
</label>
</div>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-content" class="debug-module">
<span data-i18n="options.debugContent">🟣 Content (главный)</span>
</label>
</div>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-novnc" class="debug-module">
<span data-i18n="options.debugNovnc">💠 NoVNC (переадресация)</span>
</label>
</div>
<div class="setting-item-compact">
<label>
<input type="checkbox" id="debug-autologin" class="debug-module">
<span data-i18n="options.debugAutologin">🔐 AutoLogin (автовход)</span>
</label>
</div>
</div>
</section>
<!-- Информация -->
<section class="info-section">
<h3 data-i18n="options.infoTitle"> Информация</h3>
<p><strong data-i18n="options.infoVersion">Версия:</strong> <span id="app-version"></span></p>
<p><strong data-i18n="options.infoName">Название:</strong> CAPS Enhancer</p>
<p data-i18n="options.infoReloadHint">После изменения настроек перезагрузите страницы для применения изменений.</p>
</section>
</div>
</div>
<!-- Статус -->
<div id="status" class="status hidden"></div>
<!-- Кнопки действий -->
<div class="actions">
<button id="save-btn" class="btn btn-primary" data-i18n="options.saveBtn">💾 Сохранить</button>
<button id="reset-btn" class="btn btn-secondary" data-i18n="options.resetBtn">🔄 Сбросить</button>
</div>
</div>
</div>
<script src="js/strings.js"></script>
<script src="js/options.js"></script>
</body>
</html>