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