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

@@ -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');