mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
I moved most code in pages/login.vue to a separate LoginForm component. The intention is to have a separate vue storybook for the LoginForm component.
28 lines
600 B
Vue
28 lines
600 B
Vue
<template>
|
|
<transition name="fade" appear>
|
|
<login-form @success="handleSuccess" />
|
|
</transition>
|
|
</template>
|
|
|
|
<script>
|
|
import LoginForm from '~/components/LoginForm/LoginForm.vue'
|
|
import { VERSION } from '~/constants/terms-and-conditions-version.js'
|
|
|
|
export default {
|
|
layout: 'no-header',
|
|
components: {
|
|
LoginForm,
|
|
},
|
|
asyncData({ store, redirect }) {
|
|
if (store.getters['auth/user'].termsAndConditionsAgreedVersion === VERSION) {
|
|
redirect('/')
|
|
}
|
|
},
|
|
methods: {
|
|
handleSuccess() {
|
|
this.$router.replace(this.$route.query.path || '/')
|
|
},
|
|
},
|
|
}
|
|
</script>
|