2019-10-06 21:32:46 +02:00
|
|
|
<template>
|
|
|
|
<div id="login-register">
|
2021-01-05 13:03:46 +01:00
|
|
|
<section class="login">
|
|
|
|
<h3>{{ $t("default.Login") }} </h3>
|
|
|
|
<LoginForm @onLogedIn="onLogedIn" />
|
|
|
|
</section>
|
|
|
|
<section class="register">
|
|
|
|
<h3>{{ $t("default.Register a new account") }}</h3>
|
|
|
|
<RegisterForm @onRegistered="onRegistered" />
|
|
|
|
</section>
|
2019-10-06 21:32:46 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import { mapState, mapActions } from 'vuex'
|
|
|
|
import LoginForm from 'vuejs/components/Form/LoginForm'
|
|
|
|
import RegisterForm from 'vuejs/components/Form/RegisterForm'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "LoginRegister",
|
|
|
|
data: () => ({
|
|
|
|
loginEmail:null,
|
|
|
|
password:null,
|
|
|
|
registerEmail:null
|
|
|
|
}),
|
2021-01-06 12:23:27 +01:00
|
|
|
props:['callbackargs'],
|
2019-10-06 21:32:46 +02:00
|
|
|
methods: {
|
|
|
|
...mapActions({
|
|
|
|
userLogin: 'User/userLogin',
|
|
|
|
userRegister: 'User/userRegister'
|
|
|
|
}),
|
|
|
|
onLogedIn () {
|
2021-01-06 12:23:27 +01:00
|
|
|
this.$emit('onLogedIn', this.callbackargs)
|
2019-10-06 21:32:46 +02:00
|
|
|
},
|
|
|
|
onRegistered () {
|
2021-01-06 12:23:27 +01:00
|
|
|
this.$emit('onRegistered', this.callbackargs)
|
2019-10-06 21:32:46 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
LoginForm,
|
|
|
|
RegisterForm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
fieldset{
|
|
|
|
padding:0;
|
|
|
|
margin:0;
|
|
|
|
border:none;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|