From 4e75f2fa4d811a5026681619c4333fdf56f690d2 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 28 May 2025 20:45:35 +0300 Subject: [PATCH] Change no neutral warning text to align with other inputs --- public/index.html | 4 ++-- public/scripts/secrets.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 848c668f8..e5468ec29 100644 --- a/public/index.html +++ b/public/index.html @@ -3296,8 +3296,8 @@ "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token" }'> -
- 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.
diff --git a/public/scripts/secrets.js b/public/scripts/secrets.js index 488acb22e..279a28351 100644 --- a/public/scripts/secrets.js +++ b/public/scripts/secrets.js @@ -81,8 +81,13 @@ const INPUT_MAP = { [SECRET_KEYS.GENERIC]: '#api_key_generic', [SECRET_KEYS.DEEPSEEK]: '#api_key_deepseek', [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() { const key = $(this).data('key'); await writeSecret(key, ''); @@ -94,6 +99,9 @@ async function clearSecret() { export function updateSecretDisplay() { 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 placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text');