Change no neutral warning text to align with other inputs
| @@ -3296,8 +3296,8 @@ | |||
| 3296 | "auth_uri": "https://accounts.google.com/o/oauth2/auth", | 3296 | "auth_uri": "https://accounts.google.com/o/oauth2/auth", |
| 3297 | "token_uri": "https://oauth2.googleapis.com/token" | 3297 | "token_uri": "https://oauth2.googleapis.com/token" |
| 3298 | }'></textarea> | 3298 | }'></textarea> |
| 3299 | <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."> | 3299 | <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."> |
| 3300 | Paste the complete JSON content of your Google Cloud Service Account key file. The content will be stored securely. | 3300 | For privacy reasons, your Service Account JSON content will be hidden after you reload the page. |
| 3301 | </div> | 3301 | </div> |
| 3302 | <div class="flex-container"> | 3302 | <div class="flex-container"> |
| 3303 | <button type="button" id="vertexai_validate_service_account" class="menu_button menu_button_icon" data-i18n="Validate JSON">Validate JSON</button> | 3303 | <button type="button" id="vertexai_validate_service_account" class="menu_button menu_button_icon" data-i18n="Validate JSON">Validate JSON</button> |
| @@ -81,8 +81,13 @@ const INPUT_MAP = { | |||
| 81 | [SECRET_KEYS.GENERIC]: '#api_key_generic', | 81 | [SECRET_KEYS.GENERIC]: '#api_key_generic', |
| 82 | [SECRET_KEYS.DEEPSEEK]: '#api_key_deepseek', | 82 | [SECRET_KEYS.DEEPSEEK]: '#api_key_deepseek', |
| 83 | [SECRET_KEYS.XAI]: '#api_key_xai', | 83 | [SECRET_KEYS.XAI]: '#api_key_xai', |
| 84 | [SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT]: '#vertexai_service_account_json', | ||
| 84 | }; | 85 | }; |
| 85 | 86 | ||
| 87 | const STATIC_PLACEHOLDER_KEYS = [ | ||
| 88 | SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT, | ||
| 89 | ]; | ||
| 90 | |||
| 86 | async function clearSecret() { | 91 | async function clearSecret() { |
| 87 | const key = $(this).data('key'); | 92 | const key = $(this).data('key'); |
| 88 | await writeSecret(key, ''); | 93 | await writeSecret(key, ''); |
| @@ -94,6 +99,9 @@ async function clearSecret() { | |||
| 94 | 99 | ||
| 95 | export function updateSecretDisplay() { | 100 | export function updateSecretDisplay() { |
| 96 | for (const [secret_key, input_selector] of Object.entries(INPUT_MAP)) { | 101 | for (const [secret_key, input_selector] of Object.entries(INPUT_MAP)) { |
| 102 | if (STATIC_PLACEHOLDER_KEYS.includes(secret_key)) { | ||
| 103 | continue; | ||
| 104 | } | ||
| 97 | const validSecret = !!secret_state[secret_key]; | 105 | const validSecret = !!secret_state[secret_key]; |
| 98 | 106 | ||
| 99 | const placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text'); | 107 | const placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text'); |