Improved Key Passwords with Hiding

This commit is contained in:
Eric Watkins 2024-03-18 22:24:28 -05:00
parent 5551cd1a1e
commit 4b8a4d4e3f

View File

@ -40,12 +40,15 @@
<v-text-field
v-model="item.login_password.password"
:append-icon="showLoginPassword ? 'mdi-eye' : 'mdi-eye-off'"
:label="$t('password')"
:rules="[v => (!!v || !canEditSecrets) || $t('password_required')]"
:type="showLoginPassword ? 'text' : 'password'"
v-if="item.type === 'login_password'"
:required="canEditSecrets"
:disabled="formSaving || !canEditSecrets"
autocomplete="new-password"
@click:append="showLoginPassword = !showLoginPassword"
/>
<v-text-field
@ -57,9 +60,12 @@
<v-text-field
v-model="item.ssh.passphrase"
:append-icon="showSSHPassphrase ? 'mdi-eye' : 'mdi-eye-off'"
label="Passphrase (Optional)"
:type="showSSHPassphrase ? 'text' : 'password'"
v-if="item.type === 'ssh'"
:disabled="formSaving || !canEditSecrets"
@click:append="showSSHPassphrase = !showSSHPassphrase"
/>
<v-textarea
@ -94,6 +100,8 @@ export default {
mixins: [ItemFormBase],
data() {
return {
showLoginPassword: false,
showSSHPassphrase: false,
inventoryTypes: [{
id: 'ssh',
name: `${this.$t('keyFormSshKey')}`,