create new register route(Laravel) , create new email successfully verified route(Vue)

This commit is contained in:
Milos Holba
2021-05-22 19:36:02 +02:00
parent a7e26cb61f
commit 4d078dc24a
12 changed files with 180 additions and 12 deletions
+9
View File
@@ -334,6 +334,15 @@ const routesShared = [
},
]
const routesAuth = [
{
name: 'SuccessfullyVerified',
path: '/successfully-verified',
component: () =>
import(/* webpackChunkName: "chunks/email-verified" */ './views/Auth/SuccessfullyEmailVerified'),
meta: {
requiresAuth: false
},
},
{
name: 'SignIn',
path: '/sign-in',
+12 -6
View File
@@ -132,17 +132,23 @@
// Send request to get user token
axios
.post('/register', this.register)
.post('/api/register', this.register)
.then(() => {
// End loading
this.isLoading = false
// Set login state
this.$store.commit('SET_AUTHORIZED', true)
// Go to files page
this.$router.push({name: 'Files'})
if(! config.userVerification) {
// Set login state
this.$store.commit('SET_AUTHORIZED', true)
// Go to files page
this.$router.push({name: 'Files'})
} else {
// Go to sign-in page
this.$router.push({name: 'SignIn'})
}
})
.catch(error => {
@@ -0,0 +1,40 @@
<template>
<AuthContentWrapper>
<AuthContent :visible="true">
<img v-if="config.app_logo" class="logo" :src="$getImage(config.app_logo)" :alt="config.app_name">
<b v-if="! config.app_logo" class="auth-logo-text">{{ config.app_name }}</b>
<h1>{{ $t('page_login.title') }}</h1>
<h2>{{ $t('page_email_successfully_verified') }}</h2>
<a href="/sign-in">
<AuthButton icon="chevron-right" :text="$t('page_sign_in.button_log_in')"/>
</a>
</AuthContent>
</AuthContentWrapper>
</template>
<script>
import AuthContentWrapper from '@/components/Auth/AuthContentWrapper'
import AuthContent from '@/components/Auth/AuthContent'
import AuthButton from '@/components/Auth/AuthButton'
import {mapGetters} from 'vuex'
export default {
name: 'SuccessfullyEmailVerified',
components: {
AuthContentWrapper,
AuthContent,
AuthButton,
},
computed: {
...mapGetters(['config']),
},
}
</script>
<style scoped lang="scss">
@import '@assets/vuefilemanager/_auth-form';
@import '@assets/vuefilemanager/_auth';
</style>