akkoma-fe/src/components/login_form/login_form.js
Roger Braun 08297ea83e Remove redirect on login
This is to enable this workflow:

1. Open conversation in new tab
2. Login
3. Interact with the conversation

We can add this again once we have persistent logins.
2017-03-09 08:51:33 +01:00

24 lines
441 B
JavaScript

const LoginForm = {
data: () => ({
user: {},
authError: false
}),
computed: {
loggingIn () { return this.$store.state.users.loggingIn }
},
methods: {
submit () {
this.$store.dispatch('loginUser', this.user).then(
() => {},
(error) => {
this.authError = error
this.user.username = ''
this.user.password = ''
}
)
}
}
}
export default LoginForm