Get a working rough copy of the login page
This commit is contained in:
parent
94710934b9
commit
324b989a29
13 changed files with 265 additions and 68 deletions
|
@ -1,14 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<login-form
|
||||
v-if="this.$route.path === '/'"
|
||||
v-bind:email="email"
|
||||
v-on:update-email="onEmailUpdate"
|
||||
v-if="this.$route.name === 'login'"
|
||||
v-bind:user="user"
|
||||
v-on:update-email="onUpdateEmail"
|
||||
/>
|
||||
<forgot-password
|
||||
v-if="this.$route.path === '/forgot-password'"
|
||||
v-bind:email="email"
|
||||
v-on:update-email="onEmailUpdate"
|
||||
v-if="this.$route.name === 'forgot-password'"
|
||||
v-bind:email="user.email"
|
||||
v-on:update-email="onUpdateEmail"
|
||||
/>
|
||||
<two-factor-form
|
||||
v-if="this.$route.name === 'checkpoint'"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -16,22 +19,26 @@
|
|||
<script>
|
||||
import LoginForm from "./LoginForm";
|
||||
import ForgotPassword from "./ForgotPassword";
|
||||
import TwoFactorForm from "./TwoFactorForm";
|
||||
|
||||
export default {
|
||||
name: 'login',
|
||||
data: function () {
|
||||
return {
|
||||
email: '',
|
||||
user: {
|
||||
email: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onEmailUpdate: function (value) {
|
||||
this.$data.email = value;
|
||||
onUpdateEmail: function (value) {
|
||||
this.$data.user.email = value;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
TwoFactorForm,
|
||||
ForgotPassword,
|
||||
LoginForm
|
||||
LoginForm,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Reference in a new issue