Lock the secret field in twoFaccounts Edit form

This commit is contained in:
Bubka 2022-05-17 14:07:11 +02:00
parent 94d23c7d06
commit 0ed4086fb1

View File

@ -39,7 +39,21 @@
</span> </span>
</p> </p>
<p class="control is-expanded"> <p class="control is-expanded">
<input class="input" type="text" v-model="form.secret"> <input class="input" type="text" v-model="form.secret" :disabled="secretIsLocked">
</p>
<p class="control" v-if="secretIsLocked">
<a class="button is-dark field-lock" @click="secretIsLocked = false" :title="$t('twofaccounts.forms.unlock.title')">
<span class="icon">
<font-awesome-icon :icon="['fas', 'lock']" />
</span>
</a>
</p>
<p class="control" v-else>
<a class="button is-dark field-unlock" @click="secretIsLocked = true" :title="$t('twofaccounts.forms.lock.title')">
<span class="icon has-text-danger">
<font-awesome-icon :icon="['fas', 'lock-open']" />
</span>
</a>
</p> </p>
</div> </div>
<div class="field"> <div class="field">
@ -154,6 +168,7 @@
{ text: 'sha512', value: 'sha512' }, { text: 'sha512', value: 'sha512' },
{ text: 'md5', value: 'md5' }, { text: 'md5', value: 'md5' },
], ],
secretIsLocked: true,
} }
}, },