Localize two hard-coded strings

This commit is contained in:
Yokayo 2024-04-24 21:07:42 +07:00 committed by GitHub
parent d65f068310
commit 2b1aee9e71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -62,10 +62,11 @@ async function clearSecret() {
$('#main_api').trigger('change'); $('#main_api').trigger('change');
} }
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)) {
const validSecret = !!secret_state[secret_key]; const validSecret = !!secret_state[secret_key];
const placeholder = validSecret ? '✔️ Key saved' : '❌ Missing key';
const placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text');
$(input_selector).attr('placeholder', placeholder); $(input_selector).attr('placeholder', placeholder);
} }
} }