front > account : add password toggle visibility
This commit is contained in:
parent
921eab5e7e
commit
6c5737f456
1 changed files with 9 additions and 2 deletions
|
|
@ -32,7 +32,7 @@
|
|||
</li>
|
||||
<li :class="{ 'is-editing': isEditingEmail }">
|
||||
<input
|
||||
type="password"
|
||||
:type="isPasswordHidden ? 'password' : 'text'"
|
||||
v-model="password"
|
||||
id="password"
|
||||
placeholder="Minimum 8 caractères"
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
required
|
||||
/>
|
||||
<input
|
||||
type="password"
|
||||
:type="isPasswordHidden ? 'password' : 'text'"
|
||||
v-model="passwordConfirm"
|
||||
id="password-confirm"
|
||||
placeholder="Minimum 8 caractères"
|
||||
|
|
@ -49,6 +49,12 @@
|
|||
:class="{ invalid: !isPasswordConfirmed }"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
class="btn | w-full"
|
||||
@click="isPasswordHidden = !isPasswordHidden"
|
||||
>
|
||||
{{ isPasswordHidden ? 'afficher' : 'masquer' }}
|
||||
</button>
|
||||
<button
|
||||
class="btn | w-full"
|
||||
:class="'btn--' + passwordBtn.status"
|
||||
|
|
@ -118,6 +124,7 @@ const passwordBtn = ref({
|
|||
status: 'ready',
|
||||
});
|
||||
const passwordConfirm = ref('');
|
||||
const isPasswordHidden = ref(true);
|
||||
const isPasswordConfirmed = computed(() => {
|
||||
return (
|
||||
passwordConfirm.value.length > 7 && passwordConfirm.value === password.value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue