caps_enhancer/options.html
2026-03-23 14:02:46 +03:00

252 lines
17 KiB
HTML
Raw 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">
<!-- Настройки 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>
<!-- Замена логотипа -->
<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">На главной странице показывать icons/caps.svg вместо логотипа CleverPark</span>
<label class="switch">
<input type="checkbox" id="replace-logo">
<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">Автоматически заполнять логин и пароль на /login (порт 5000)</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-username">
<span class="label-text" data-i18n="options.autologinUsernameLabel">Логин</span>
<span class="label-description" data-i18n="options.autologinUsernameDesc">Имя пользователя для автоматического входа</span>
</label>
<input type="text" id="autologin-username" data-i18n-placeholder="options.autologinUsernamePlaceholder" placeholder="admin" autocomplete="off">
</div>
<div class="setting-item">
<label for="autologin-password">
<span class="label-text" data-i18n="options.autologinPasswordLabel">Пароль</span>
<span class="label-description" data-i18n="options.autologinPasswordDesc">Пароль для автологина (только для тестовых/локальных систем)</span>
</label>
<input type="text" id="autologin-password" class="password-field" data-i18n-placeholder="options.autologinPasswordPlaceholder" placeholder="••••••••" autocomplete="off">
<small class="hint" data-i18n="options.autologinPasswordHint">⚠️ Пароль хранится в настройках Chrome. Не используйте важные или личные пароли.</small>
</div>
<div class="setting-item inline">
<label class="switch-label">
<span class="label-text" data-i18n="options.autologinAutoSubmitLabel">Автоматически нажимать "Вход"</span>
<label class="switch">
<input type="checkbox" id="autologin-autosubmit">
<span class="slider"></span>
</label>
</label>
</div>
<div class="setting-item inline">
<label for="autologin-delay">
<span class="label-text" data-i18n="options.autologinDelayLabel">Задержка (мс)</span>
</label>
<input type="number" id="autologin-delay" data-i18n-placeholder="options.autologinDelayPlaceholder" placeholder="500" min="0" max="5000" step="100">
</div>
</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>