fix: correct i18n keys in settings modal for metadata archive and proxy settings

- Fix metadata archive DB setting to use correct i18n keys (enableArchiveDb, etc.)
- Restore metadata archive status display and management buttons
- Fix proxy settings to use correct i18n keys (enableProxy, proxyType, proxyHost, etc.)
- Add missing help text for proxy settings
- Add SOCKS4 proxy option
- Add onblur/onkeydown handlers for proxy input fields
- Update locales for new nav items (organization, system, network)
This commit is contained in:
Will Miao
2026-02-24 11:30:43 +08:00
parent 60674feb10
commit 8d7e861458
11 changed files with 244 additions and 172 deletions

View File

@@ -270,10 +270,12 @@
"proxySettings": "Proxy-Einstellungen"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "Allgemein",
"interface": "Oberfläche",
"download": "Download",
"organization": "Organisation",
"system": "System",
"network": "Netzwerk"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -273,7 +273,9 @@
"general": "General",
"interface": "Interface",
"download": "Download",
"advanced": "Advanced"
"organization": "Organization",
"system": "System",
"network": "Network"
},
"search": {
"placeholder": "Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "Configuración de proxy"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "General",
"interface": "Interfaz",
"download": "Descarga",
"organization": "Organización",
"system": "Sistema",
"network": "Red"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "Paramètres du proxy"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "Général",
"interface": "Interface",
"download": "Téléchargement",
"organization": "Organisation",
"system": "Système",
"network": "Réseau"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "הגדרות פרוקסי"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "כללי",
"interface": "ממשק",
"download": "הורדה",
"organization": "ארגון",
"system": "מערכת",
"network": "רשת"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "プロキシ設定"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "一般",
"interface": "インターフェース",
"download": "ダウンロード",
"organization": "整理",
"system": "システム",
"network": "ネットワーク"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "프록시 설정"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "일반",
"interface": "인터페이스",
"download": "다운로드",
"organization": "정리",
"system": "시스템",
"network": "네트워크"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "Настройки прокси"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "Общее",
"interface": "Интерфейс",
"download": "Загрузка",
"organization": "Организация",
"system": "Система",
"network": "Сеть"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "代理设置"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "通用",
"interface": "界面",
"download": "下载",
"organization": "整理",
"system": "系统",
"network": "网络"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -270,10 +270,12 @@
"proxySettings": "代理設定"
},
"nav": {
"general": "[TODO: Translate] General",
"interface": "[TODO: Translate] Interface",
"download": "[TODO: Translate] Download",
"advanced": "[TODO: Translate] Advanced"
"general": "通用",
"interface": "介面",
"download": "下載",
"organization": "整理",
"system": "系統",
"network": "網路"
},
"search": {
"placeholder": "[TODO: Translate] Search settings...",

View File

@@ -36,7 +36,9 @@
<button type="button" class="settings-nav-item active" data-section="general">{{ t('settings.nav.general') }}</button>
<button type="button" class="settings-nav-item" data-section="interface">{{ t('settings.nav.interface') }}</button>
<button type="button" class="settings-nav-item" data-section="download">{{ t('settings.nav.download') }}</button>
<button type="button" class="settings-nav-item" data-section="advanced">{{ t('settings.nav.advanced') }}</button>
<button type="button" class="settings-nav-item" data-section="organization">{{ t('settings.nav.organization') }}</button>
<button type="button" class="settings-nav-item" data-section="system">{{ t('settings.nav.system') }}</button>
<button type="button" class="settings-nav-item" data-section="network">{{ t('settings.nav.network') }}</button>
</li>
</ul>
</nav>
@@ -94,6 +96,32 @@
{{ t('settings.storage.locationHelp') }}
</div>
</div>
<!-- Language -->
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="languageSelect">{{ t('common.language.select') }}</label>
</div>
<div class="setting-control select-control">
<select id="languageSelect" onchange="settingsManager.saveLanguageSetting()">
<option value="en">{{ t('common.language.english') }}</option>
<option value="zh-CN">{{ t('common.language.chinese_simplified') }}</option>
<option value="zh-TW">{{ t('common.language.chinese_traditional') }}</option>
<option value="ru">{{ t('common.language.russian') }}</option>
<option value="de">{{ t('common.language.german') }}</option>
<option value="ja">{{ t('common.language.japanese') }}</option>
<option value="ko">{{ t('common.language.korean') }}</option>
<option value="fr">{{ t('common.language.french') }}</option>
<option value="es">{{ t('common.language.spanish') }}</option>
<option value="he">{{ t('common.language.Hebrew') }}</option>
</select>
</div>
</div>
<div class="input-help">
{{ t('common.language.select_help') }}
</div>
</div>
</div>
<!-- Section 2: Interface -->
@@ -251,32 +279,6 @@
{{ t('settings.layoutSettings.modelCardFooterActionHelp') }}
</div>
</div>
<!-- Language -->
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="languageSelect">{{ t('common.language.select') }}</label>
</div>
<div class="setting-control select-control">
<select id="languageSelect" onchange="settingsManager.saveLanguageSetting()">
<option value="en">{{ t('common.language.english') }}</option>
<option value="zh-CN">{{ t('common.language.chinese_simplified') }}</option>
<option value="zh-TW">{{ t('common.language.chinese_traditional') }}</option>
<option value="ru">{{ t('common.language.russian') }}</option>
<option value="de">{{ t('common.language.german') }}</option>
<option value="ja">{{ t('common.language.japanese') }}</option>
<option value="ko">{{ t('common.language.korean') }}</option>
<option value="fr">{{ t('common.language.french') }}</option>
<option value="es">{{ t('common.language.spanish') }}</option>
<option value="he">{{ t('common.language.Hebrew') }}</option>
</select>
</div>
</div>
<div class="input-help">
{{ t('common.language.select_help') }}
</div>
</div>
</div>
<!-- Section 3: Download -->
@@ -569,13 +571,6 @@
{{ t('settings.exampleImages.optimizeImagesHelp') }}
</div>
</div>
</div>
<!-- Section 4: Advanced -->
<div id="section-advanced" class="settings-section" data-section="advanced">
<div class="settings-section-header">
<h3>{{ t('settings.nav.advanced') }}</h3>
</div>
<!-- Priority Tags -->
<div class="setting-item priority-tags-item">
@@ -614,9 +609,13 @@
</div>
</div>
</div>
<div class="priority-tags-example">
{{ t('settings.priorityTags.example') }}: <code>character, concept, clothing, realistic, anime, toon, furry, style, poses, background, tool, vehicle, buildings, objects, assets, animal, action</code>
</div>
</div>
</div>
<!-- Section 4: Organization -->
<div id="section-organization" class="settings-section" data-section="organization">
<div class="settings-section-header">
<h3>{{ t('settings.nav.organization') }}</h3>
</div>
<!-- Auto-organize Exclusions -->
@@ -646,128 +645,55 @@
<textarea id="metadataRefreshSkipPaths" class="priority-tags-input auto-organize-exclusions-input" placeholder="{{ t('settings.metadataRefreshSkipPaths.placeholder') }}"></textarea>
<div class="settings-input-error-message" id="metadataRefreshSkipPathsError"></div>
</div>
</div>
<!-- Section 5: System -->
<div id="section-system" class="settings-section" data-section="system">
<div class="settings-section-header">
<h3>{{ t('settings.nav.system') }}</h3>
</div>
<!-- Metadata Archive -->
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="metadataArchiveEnabled">{{ t('settings.metadataArchive.enabled') }}</label>
<label for="enableMetadataArchive">{{ t('settings.metadataArchive.enableArchiveDb') }}</label>
</div>
<div class="setting-control">
<label class="toggle-switch">
<input type="checkbox" id="metadataArchiveEnabled"
onchange="settingsManager.saveToggleSetting('metadataArchiveEnabled', 'metadata_archive_enabled')">
<input type="checkbox" id="enableMetadataArchive"
onchange="settingsManager.saveToggleSetting('enableMetadataArchive', 'enable_metadata_archive_db')">
<span class="toggle-slider"></span>
</label>
</div>
</div>
<div class="input-help">
{{ t('settings.metadataArchive.enabledHelp') }}
{{ t('settings.metadataArchive.enableArchiveDbHelp') }}
</div>
</div>
<div class="setting-item">
<div class="metadata-archive-status" id="metadataArchiveStatus">
<!-- Status will be populated by JavaScript -->
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="metadataArchivePath">{{ t('settings.metadataArchive.path') }}</label>
</div>
<div class="setting-control path-control">
<input type="text" id="metadataArchivePath" placeholder="{{ t('settings.metadataArchive.pathPlaceholder') }}" />
</div>
</div>
<div class="input-help">
{{ t('settings.metadataArchive.pathHelp') }}
</div>
</div>
<!-- Proxy Settings -->
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyEnabled">{{ t('settings.proxySettings.enabled') }}</label>
<label>{{ t('settings.metadataArchive.management') }}</label>
</div>
<div class="setting-control">
<label class="toggle-switch">
<input type="checkbox" id="proxyEnabled"
onchange="settingsManager.saveToggleSetting('proxyEnabled', 'proxy_enabled')">
<span class="toggle-slider"></span>
</label>
<button type="button" id="downloadMetadataArchiveBtn" class="primary-btn" onclick="settingsManager.downloadMetadataArchive()">
{{ t('settings.metadataArchive.downloadButton') }}
</button>
<button type="button" id="removeMetadataArchiveBtn" class="danger-btn" onclick="settingsManager.removeMetadataArchive()" style="margin-left: 10px;">
{{ t('settings.metadataArchive.removeButton') }}
</button>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.enabledHelp') }}
</div>
</div>
<div id="proxySettingsGroup" class="proxy-settings-group" style="display: none;">
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyType">{{ t('settings.proxySettings.type') }}</label>
</div>
<div class="setting-control select-control">
<select id="proxyType" onchange="settingsManager.saveSelectSetting('proxyType', 'proxy_type')">
<option value="http">HTTP</option>
<option value="https">HTTPS</option>
<option value="socks5">SOCKS5</option>
</select>
</div>
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyHost">{{ t('settings.proxySettings.host') }}</label>
</div>
<div class="setting-control">
<div class="text-input-wrapper">
<input type="text" id="proxyHost" placeholder="{{ t('settings.proxySettings.hostPlaceholder') }}" />
</div>
</div>
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyPort">{{ t('settings.proxySettings.port') }}</label>
</div>
<div class="setting-control">
<div class="text-input-wrapper">
<input type="text" id="proxyPort" placeholder="{{ t('settings.proxySettings.portPlaceholder') }}" />
</div>
</div>
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyUsername">{{ t('settings.proxySettings.username') }}</label>
</div>
<div class="setting-control">
<div class="text-input-wrapper">
<input type="text" id="proxyUsername" placeholder="{{ t('settings.proxySettings.usernamePlaceholder') }}" />
</div>
</div>
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyPassword">{{ t('settings.proxySettings.password') }}</label>
</div>
<div class="setting-control">
<div class="api-key-input">
<input type="password" id="proxyPassword" placeholder="{{ t('settings.proxySettings.passwordPlaceholder') }}" />
<button class="toggle-visibility">
<i class="fas fa-eye"></i>
</button>
</div>
</div>
</div>
{{ t('settings.metadataArchive.managementHelp') }}
</div>
</div>
@@ -791,6 +717,132 @@
</div>
</div>
<!-- Section 6: Network -->
<div id="section-network" class="settings-section" data-section="network">
<div class="settings-section-header">
<h3>{{ t('settings.nav.network') }}</h3>
</div>
<!-- Proxy Settings -->
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyEnabled">{{ t('settings.proxySettings.enableProxy') }}</label>
</div>
<div class="setting-control">
<label class="toggle-switch">
<input type="checkbox" id="proxyEnabled"
onchange="settingsManager.saveToggleSetting('proxyEnabled', 'proxy_enabled')">
<span class="toggle-slider"></span>
</label>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.enableProxyHelp') }}
</div>
</div>
<div id="proxySettingsGroup" class="proxy-settings-group" style="display: none;">
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyType">{{ t('settings.proxySettings.proxyType') }}</label>
</div>
<div class="setting-control select-control">
<select id="proxyType" onchange="settingsManager.saveSelectSetting('proxyType', 'proxy_type')">
<option value="http">HTTP</option>
<option value="https">HTTPS</option>
<option value="socks4">SOCKS4</option>
<option value="socks5">SOCKS5</option>
</select>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.proxyTypeHelp') }}
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyHost">{{ t('settings.proxySettings.proxyHost') }}</label>
</div>
<div class="setting-control">
<div class="text-input-wrapper">
<input type="text" id="proxyHost"
placeholder="{{ t('settings.proxySettings.proxyHostPlaceholder') }}"
onblur="settingsManager.saveInputSetting('proxyHost', 'proxy_host')"
onkeydown="if(event.key === 'Enter') { this.blur(); }" />
</div>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.proxyHostHelp') }}
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyPort">{{ t('settings.proxySettings.proxyPort') }}</label>
</div>
<div class="setting-control">
<div class="text-input-wrapper">
<input type="text" id="proxyPort"
placeholder="{{ t('settings.proxySettings.proxyPortPlaceholder') }}"
onblur="settingsManager.saveInputSetting('proxyPort', 'proxy_port')"
onkeydown="if(event.key === 'Enter') { this.blur(); }" />
</div>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.proxyPortHelp') }}
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyUsername">{{ t('settings.proxySettings.proxyUsername') }}</label>
</div>
<div class="setting-control">
<div class="text-input-wrapper">
<input type="text" id="proxyUsername"
placeholder="{{ t('settings.proxySettings.proxyUsernamePlaceholder') }}"
onblur="settingsManager.saveInputSetting('proxyUsername', 'proxy_username')"
onkeydown="if(event.key === 'Enter') { this.blur(); }" />
</div>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.proxyUsernameHelp') }}
</div>
</div>
<div class="setting-item">
<div class="setting-row">
<div class="setting-info">
<label for="proxyPassword">{{ t('settings.proxySettings.proxyPassword') }}</label>
</div>
<div class="setting-control">
<div class="api-key-input">
<input type="password" id="proxyPassword"
placeholder="{{ t('settings.proxySettings.proxyPasswordPlaceholder') }}"
onblur="settingsManager.saveInputSetting('proxyPassword', 'proxy_password')"
onkeydown="if(event.key === 'Enter') { this.blur(); }" />
<button class="toggle-visibility">
<i class="fas fa-eye"></i>
</button>
</div>
</div>
</div>
<div class="input-help">
{{ t('settings.proxySettings.proxyPasswordHelp') }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>