strava-frontend/src/pages/auth/RecoverPassword.vue

42 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<VaForm ref="passwordForm" @submit.prevent="submit">
<h1 class="font-semibold text-4xl mb-4">Забыли свой пароль?</h1>
<p class="text-base mb-4 leading-5">
Если вы забыли свой пароль, не волнуйтесь. Просто введите свой адрес
электронной почты ниже, и мы отправим вам электронное письмо с временным
паролем.
</p>
<VaInput
v-model="email"
:rules="[(v) => !!v || 'Email обязательное поле']"
class="mb-4"
label="Введите ваш email"
type="email"
/>
<VaButton class="w-full mb-2" @click="submit">Отправить пароль</VaButton>
<VaButton
:to="{ name: 'login' }"
class="w-full"
preset="secondary"
@click="submit"
>Вернуться</VaButton
>
</VaForm>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import { useForm } from "vuestic-ui";
import { useRouter } from "vue-router";
const email = ref("");
const form = useForm("passwordForm");
const router = useRouter();
const submit = () => {
if (form.validate()) {
router.push({ name: "recover-password-email" });
}
};
</script>