#8448 - devToTest #1254

Merged
alexm merged 365 commits from 8448-devToTest into test 2025-01-21 10:44:46 +00:00
2 changed files with 18 additions and 30 deletions
Showing only changes of commit 0d9ba62d37 - Show all commits

View File

@ -19,8 +19,6 @@ const changePassDialog = ref();
const passwords = ref({ newPassword: null, repeatPassword: null });
const requirements = ref([]);
const isLoading = ref(false);
const showPwd = ref(true);
const showRpPwd = ref(true);
const validate = async () => {
const { newPassword, repeatPassword, oldPassword } = passwords.value;
@ -79,39 +77,32 @@ defineExpose({ show: () => changePassDialog.value.show() });
type="password"
:required="true"
autofocus
:clearable="true"
:show-pwd="showPwd"
@update:show-pwd="showPwd = $event"
:toggle-visibility="true"
/>
<VnInput
:required="true"
autofocus
:label="t('New password')"
v-model="passwords.newPassword"
:label="$t('New password')"
:show-pwd="showPwd"
@update:show-pwd="showPwd = $event"
>
<!-- <template #append>
<QIcon
:name="showPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="showPwd = !showPwd"
type="password"
:required="true"
:toggle-visibility="true"
:info="
t('passwordRequirements', {
length: requirements.length,
nAlpha: requirements.nAlpha,
nUpper: requirements.nUpper,
nDigits: requirements.nDigits,
nPunct: requirements.nPunct,
})
"
autofocus
/>
</template> -->
</VnInput>
<VnInput
:label="t('Repeat password')"
v-model="passwords.repeatPassword"
type="password"
:toggle-visibility="true"
/>
<!-- <template #append>
<QIcon
:name="showRpPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="showRpPwd = !showRpPwd"
/>
</template> -->
</QCardSection>
</QForm>
<QCardActions>

View File

@ -43,14 +43,13 @@ const $props = defineProps({
default: null,
},
toggleVisibility: {
// Nueva propiedad
type: Boolean,
default: false,
},
});
const vnInputRef = ref(null);
const showPassword = ref(false); // Estado para la visibilidad de contraseña
const showPassword = ref(false);
const value = computed({
get() {
return $props.modelValue;
@ -144,14 +143,12 @@ const handleInsertMode = (e) => {
<slot name="prepend" />
</template>
<template #append>
<!-- Icono para mostrar/ocultar contraseña -->
<QIcon
v-if="toggleVisibility"
:name="showPassword ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="showPassword = !showPassword"
/>
<!-- Ícono para borrar el valor -->
<QIcon
name="close"
size="xs"