aboutsummaryrefslogtreecommitdiff
path: root/src/components/login_form/login_form.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-03-09 09:19:40 +0100
committerRoger Braun <roger@rogerbraun.net>2017-03-09 09:19:40 +0100
commit2f52669380703030aa8e197deb05240c5f3bf979 (patch)
tree5b40b0d4efd3d132c8bdd321092ce2bd5fb8a0e6 /src/components/login_form/login_form.js
parentc921662036fe39f5146d5a36b4b018af3cfc2635 (diff)
parent64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff)
Merge branch 'develop' into wakarimasen/pleroma-fe-develop
Diffstat (limited to 'src/components/login_form/login_form.js')
-rw-r--r--src/components/login_form/login_form.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/components/login_form/login_form.js b/src/components/login_form/login_form.js
index b55f770f..1a6f6015 100644
--- a/src/components/login_form/login_form.js
+++ b/src/components/login_form/login_form.js
@@ -1,15 +1,21 @@
const LoginForm = {
data: () => ({
- user: {}
+ user: {},
+ authError: false
}),
computed: {
loggingIn () { return this.$store.state.users.loggingIn }
},
methods: {
submit () {
- this.$store.dispatch('loginUser', this.user).then(() => {
- this.$router.push('/main/friends')
- })
+ this.$store.dispatch('loginUser', this.user).then(
+ () => {},
+ (error) => {
+ this.authError = error
+ this.user.username = ''
+ this.user.password = ''
+ }
+ )
}
}
}