developed
This commit is contained in:
parent
6580588cd7
commit
c76d211186
|
|
@ -116,5 +116,8 @@ export const locale = {
|
|||
|
||||
REQUIRED_VALIDATION: "This field is required",
|
||||
MIN_LENGTH_VALIDATION: "This field must be at least {min} characters long",
|
||||
EMAIL_VALIDATION: "This field must be a valid email address"
|
||||
EMAIL_VALIDATION: "This field must be a valid email address",
|
||||
|
||||
TYPE_TOKEN: "Type code you have received in email",
|
||||
NEW_PASSWORD: "New password",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -117,4 +117,7 @@ export const locale = {
|
|||
REQUIRED_VALIDATION: "Обязательное поле",
|
||||
MIN_LENGTH_VALIDATION: "This field should be at least {min} characters long",
|
||||
EMAIL_VALIDATION: "This field must be a valid email address",
|
||||
|
||||
TYPE_TOKEN: "Type code you have received in email",
|
||||
NEW_PASSWORD: "New password",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -113,8 +113,11 @@ export const locale = {
|
|||
TICKETS: "Tickets",
|
||||
NEW_TICKET: "New Ticket",
|
||||
CONTACTS: "Contracts",
|
||||
|
||||
|
||||
REQUIRED_VALIDATION: "This field is required",
|
||||
MIN_LENGTH_VALIDATION: "This field should be at least {min} characters long",
|
||||
EMAIL_VALIDATION: "This field must be a valid email address"
|
||||
EMAIL_VALIDATION: "This field must be a valid email address",
|
||||
|
||||
TYPE_TOKEN: "Type code you have received in email",
|
||||
NEW_PASSWORD: "New password",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ export const useAuthStore = defineStore({
|
|||
} catch (error) {
|
||||
// const alertStore = useAlertStore();
|
||||
// alertStore.error(error);
|
||||
router.push({ path: "/update-password" });
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -74,11 +74,12 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="intro-x mt-5 xl:mt-8 text-center xl:text-left">
|
||||
<button class="btn btn-primary py-3 px-4 w-full xl:w-32 xl:mr-3 align-top" @click.prevent="onLogin">
|
||||
<button class="btn btn-primary py-3 px-4 w-full xl:w-32 xl:mr-3 align-top custom-btns"
|
||||
@click.prevent="onLogin">
|
||||
{{$t('LOGIN')}}
|
||||
<LoadingIcon icon="oval" color="white" class="w-4 h-4 ml-2" v-if="isLoading" />
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary py-3 px-4 w-full xl:w-32 mt-3 xl:mt-0 align-top"
|
||||
<button class="btn btn-outline-secondary py-3 px-4 w-full mt-3 xl:mt-0 align-top xl:w-auto custom-btns"
|
||||
@click.prevent="onRegister">
|
||||
{{$t('REGISTER')}}
|
||||
</button>
|
||||
|
|
@ -172,4 +173,11 @@ const onRegister = () => router.push({ path: "/register" });
|
|||
onMounted(() => {
|
||||
dom("body").removeClass("main").removeClass("error-page").addClass("login");
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-btns {
|
||||
min-width: 128px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -40,15 +40,11 @@
|
|||
<h2 class="intro-x font-bold text-2xl xl:text-3xl text-center xl:text-left">
|
||||
{{$t('UPDATE_PWD')}}
|
||||
</h2>
|
||||
<div class="intro-x mt-2 text-slate-400 xl:hidden text-center">
|
||||
A few more clicks to sign in to your account. Manage all your
|
||||
e-commerce accounts in one place
|
||||
</div>
|
||||
|
||||
<div class="intro-x mt-8">
|
||||
<input type="text" v-model.trim="validate.email.$model"
|
||||
class="intro-x login__input form-control py-3 px-4 block mt-4"
|
||||
:class="{ 'border-danger': validate.email.$error }" placeholder="Email" />
|
||||
:class="{ 'border-danger': validate.email.$error }" :placeholder="$t('EMAIL')" />
|
||||
<template v-if="validate.email.$error">
|
||||
<div v-for="(error, index) in validate.email.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
|
|
@ -57,7 +53,7 @@
|
|||
|
||||
<input type="text" v-model.trim="validate.token.$model"
|
||||
class="intro-x login__input form-control py-3 px-4 block mt-4"
|
||||
:class="{ 'border-danger': validate.token.$error }" placeholder="Type token you received in mail" />
|
||||
:class="{ 'border-danger': validate.token.$error }" :placeholder="$t('TYPE_TOKEN')" />
|
||||
<template v-if="validate.token.$error">
|
||||
<div v-for="(error, index) in validate.token.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
|
|
@ -66,7 +62,7 @@
|
|||
|
||||
<input type="password" v-model.trim="validate.password.$model"
|
||||
class="intro-x login__input form-control py-3 px-4 block mt-4"
|
||||
:class="{ 'border-danger': validate.password.$error }" placeholder="Password" />
|
||||
:class="{ 'border-danger': validate.password.$error }" :placeholder="$t('PASSWORD')" />
|
||||
<template v-if="validate.password.$error">
|
||||
<div v-for="(error, index) in validate.password.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
|
|
@ -75,7 +71,7 @@
|
|||
|
||||
<input type="password" v-model.trim="validate.confirm_password.$model"
|
||||
class="intro-x login__input form-control py-3 px-4 block mt-4"
|
||||
:class="{ 'border-danger': validate.confirm_password.$error }" placeholder="New password" />
|
||||
:class="{ 'border-danger': validate.confirm_password.$error }" :placeholder="$t('NEW_PASSWORD')" />
|
||||
<template v-if="validate.confirm_password.$error">
|
||||
<div v-for="(error, index) in validate.confirm_password.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
|
|
@ -106,12 +102,15 @@ import dom from "@left4code/tw-starter/dist/js/dom";
|
|||
import { useVuelidate } from "@vuelidate/core";
|
||||
import { required, minLength, email, helpers } from "@vuelidate/validators";
|
||||
import { useAlertStore } from "@/stores";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import router from "@/router";
|
||||
import Logo from "@/components/logo/Main.vue";
|
||||
import { fetchWrapper } from "@/api";
|
||||
|
||||
const baseUrl = `${import.meta.env.VITE_API_URL}/api`;
|
||||
|
||||
const { t } = useI18n({});
|
||||
|
||||
const formData = reactive({
|
||||
email: "",
|
||||
token: "",
|
||||
|
|
|
|||
Loading…
Reference in New Issue