fix: refs #7699 fix password visibility
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-12-24 09:52:31 +01:00
parent 550340e720
commit 01f63ff239
1 changed files with 21 additions and 13 deletions

View File

@ -19,8 +19,8 @@ const changePassDialog = ref();
const passwords = ref({ newPassword: null, repeatPassword: null });
const requirements = ref([]);
const isLoading = ref(false);
const showPwd = true;
const showRpPwd = true;
const showPwd = ref(true);
const showRpPwd = ref(true);
const validate = async () => {
const { newPassword, repeatPassword, oldPassword } = passwords.value;
@ -76,10 +76,18 @@ defineExpose({ show: () => changePassDialog.value.show() });
v-if="props.askOldPass"
:label="t('Old password')"
v-model="passwords.oldPassword"
type="password"
:type="showPwd ? 'password' : 'text'"
:required="true"
autofocus
/>
>
<template #append>
<QIcon
:name="showPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="showPwd = !showPwd"
/>
</template>
</VnInput>
<VnInput
:required="true"
autofocus
@ -87,7 +95,6 @@ defineExpose({ show: () => changePassDialog.value.show() });
:label="$t('New password')"
:type="showPwd ? 'password' : 'text'"
hint=""
filled
>
<template #append>
<QIcon
@ -102,14 +109,15 @@ defineExpose({ show: () => changePassDialog.value.show() });
v-model="passwords.repeatPassword"
:type="showRpPwd ? 'password' : 'text'"
hint=""
/>
<template #append>
<QIcon
:name="showRpPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="showRpPwd = !showRpPwd"
/>
</template>
>
<template #append>
<QIcon
:name="showRpPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="showRpPwd = !showRpPwd"
/>
</template>
</VnInput>
</QCardSection>
</QForm>
<QCardActions>