fix: refs #7699 fix password visibility
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
550340e720
commit
01f63ff239
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue