🩹 fixing the visibility of the result when forgot pwd

This commit is contained in:
ChatonDeAru
2024-09-15 02:57:09 +02:00
parent 1581400595
commit 622841eed3
3 changed files with 32 additions and 29 deletions

View File

@@ -27,7 +27,7 @@ const state = reactive({
email: undefined,
})
async function onSignin(event: FormSubmitEvent<Schema>) {
async function onSend(event: FormSubmitEvent<Schema>) {
loading.value = true
const formSubmit = event.data
@@ -58,22 +58,7 @@ async function onSignin(event: FormSubmitEvent<Schema>) {
</script>
<template>
<UCard class="container mx-auto max-w-screen-md">
<h1 class="text-2xl uppercase mb-4">Réinitialiser votre mot de passe</h1>
<p>Nous pouvons envoyer un lien de récupération à ladresse courriel associé à votre compte.</p>
<UForm :schema="schema" :state="state" @submit="onSignin" class="my-8">
<UFormGroup :ui="formGroupStyle.ui" label="Adresse courriel" name="email">
<UInput :ui="inputStyle.ui" v-bind="inputStyle.attrs" v-model="state.email" />
</UFormGroup>
<p class="mt-8 text-center">
<UButton type="submit" variant="soft" :disabled="loading" :loading="loading">Récupérer mon compte</UButton>
</p>
</UForm>
</UCard>
<UCard v-if="sended">
<UCard v-if="sended" class="container mx-auto max-w-screen-md">
<h1 class="text-2xl uppercase mb-8">Cest partit</h1>
<p>
Si nous avons connaissance de cette adresse, vous devriez recevoir un courriel contenant les instructions pour
@@ -85,4 +70,19 @@ async function onSignin(event: FormSubmitEvent<Schema>) {
</UButton>
</p>
</UCard>
<UCard v-else class="container mx-auto max-w-screen-md">
<h1 class="text-2xl uppercase mb-4">Réinitialiser votre mot de passe</h1>
<p>Nous pouvons envoyer un lien de récupération à ladresse courriel associé à votre compte.</p>
<UForm :schema="schema" :state="state" @submit="onSend" class="my-8">
<UFormGroup :ui="formGroupStyle.ui" label="Adresse courriel" name="email">
<UInput :ui="inputStyle.ui" v-bind="inputStyle.attrs" v-model="state.email" />
</UFormGroup>
<p class="mt-8 text-center">
<UButton type="submit" variant="soft" :disabled="loading" :loading="loading">Récupérer mon compte</UButton>
</p>
</UForm>
</UCard>
</template>