diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 0f68f374d5..d6109da954 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -816,7 +816,9 @@
{#if password || extra?.['password'] == true} - {#if onlyMaskPassword} + {#if value && typeof value == 'string' && value?.startsWith('$var:')} + + {:else if onlyMaskPassword} { - const passwordToggle = document.querySelector('.js-password-toggle') - if (passwordToggle) { - passwordToggle.addEventListener('change', function () { - const password = document.querySelector('.js-password'), - passwordLabel = document.querySelector('.js-password-label') - - if (password.type === 'password') { - password.type = 'text' - passwordLabel.innerHTML = 'hide' - } else { - password.type = 'password' - passwordLabel.innerHTML = 'show' - } - - password.focus() - }) - } else { - throw Error('Password component is undefined') - } - }) - $: red = required && (password == '' || password == undefined) + + let hideValue = true + + let randomId = (Math.random() * 10e15).toString(16)
- + {hideValue ? 'show' : 'hide'}
- + {#if hideValue} + + {:else} + + {/if}
{#if red}
This field is required