fix(settings): prevent Firefox save-password prompt from API key input

- Remove server-side value='...' from password field in settings modal template
  so the API key is never baked into the DOM at page load time
- Populate the input dynamically via loadSettingsToUI() when modal opens
- Clear both API key and proxy password fields on modal close to prevent
  Firefox from detecting pre-filled password fields on page navigation
This commit is contained in:
Will Miao
2026-06-18 21:57:03 +08:00
parent 499e19de34
commit 3012a7aef3
2 changed files with 11 additions and 2 deletions

View File

@@ -103,7 +103,6 @@
<input type="password"
id="civitaiApiKey"
placeholder="{{ t('settings.civitaiApiKeyPlaceholder') }}"
value="{{ settings.get('civitai_api_key', '') }}"
autocomplete="new-password"
onblur="settingsManager.saveInputSetting('civitaiApiKey', 'civitai_api_key')"
onkeydown="if(event.key === 'Enter') { this.blur(); }" />