Change no neutral warning text to align with other inputs

This commit is contained in:
Cohee
2025-05-28 20:45:35 +03:00
parent 1921036666
commit 4e75f2fa4d
2 changed files with 10 additions and 2 deletions

View File

@@ -3296,8 +3296,8 @@
"auth_uri": "https://accounts.google.com/o/oauth2/auth", "auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token" "token_uri": "https://oauth2.googleapis.com/token"
}'></textarea> }'></textarea>
<div class="neutral_warning" data-i18n="Paste the complete JSON content of your Google Cloud Service Account key file. The content will be stored securely."> <div data-for="vertexai_service_account_json" class="neutral_warning" data-i18n="For privacy reasons, your Service Account JSON content will be hidden after you reload the page.">
Paste the complete JSON content of your Google Cloud Service Account key file. The content will be stored securely. For privacy reasons, your Service Account JSON content will be hidden after you reload the page.
</div> </div>
<div class="flex-container"> <div class="flex-container">
<button type="button" id="vertexai_validate_service_account" class="menu_button menu_button_icon" data-i18n="Validate JSON">Validate JSON</button> <button type="button" id="vertexai_validate_service_account" class="menu_button menu_button_icon" data-i18n="Validate JSON">Validate JSON</button>

View File

@@ -81,8 +81,13 @@ const INPUT_MAP = {
[SECRET_KEYS.GENERIC]: '#api_key_generic', [SECRET_KEYS.GENERIC]: '#api_key_generic',
[SECRET_KEYS.DEEPSEEK]: '#api_key_deepseek', [SECRET_KEYS.DEEPSEEK]: '#api_key_deepseek',
[SECRET_KEYS.XAI]: '#api_key_xai', [SECRET_KEYS.XAI]: '#api_key_xai',
[SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT]: '#vertexai_service_account_json',
}; };
const STATIC_PLACEHOLDER_KEYS = [
SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT,
];
async function clearSecret() { async function clearSecret() {
const key = $(this).data('key'); const key = $(this).data('key');
await writeSecret(key, ''); await writeSecret(key, '');
@@ -94,6 +99,9 @@ async function clearSecret() {
export function updateSecretDisplay() { export function updateSecretDisplay() {
for (const [secret_key, input_selector] of Object.entries(INPUT_MAP)) { for (const [secret_key, input_selector] of Object.entries(INPUT_MAP)) {
if (STATIC_PLACEHOLDER_KEYS.includes(secret_key)) {
continue;
}
const validSecret = !!secret_state[secret_key]; const validSecret = !!secret_state[secret_key];
const placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text'); const placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text');