aboutsummaryrefslogtreecommitdiff
path: root/src/components/login_form/login_form.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-03-09 09:00:09 +0100
committerRoger Braun <roger@rogerbraun.net>2017-03-09 09:00:09 +0100
commitb11c1f57a95e689a751c4dff72ebe7aabc9c0601 (patch)
treeb2596b07c3482c76493cc61974932cdf33e296ab /src/components/login_form/login_form.js
parent502757da28d573641a48197c284b7e40dfc8154e (diff)
parentba4f7ef3efe15aaebce523113283b5854d16ceb8 (diff)
Merge branch 'develop' into xj9/pleroma-fe-feature/even-better-nsfw-image-loading
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..bc801397 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(
+ () => { this.$router.push('/main/friends')},
+ (error) => {
+ this.authError = error
+ this.user.username = ''
+ this.user.password = ''
+ }
+ )
}
}
}