aboutsummaryrefslogtreecommitdiff
path: root/src/site/pages/login.vue
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-04-24 08:36:28 +0000
committerPitu <[email protected]>2019-04-24 08:36:28 +0000
commit3bd8d119ba88e940932eca50be406d50d73040fb (patch)
tree9d24cdfc1edc53cce6670ffabb60597636571ecd /src/site/pages/login.vue
parentGet rid of the icons altogether in a future commit (diff)
downloadhost.fuwn.me-3bd8d119ba88e940932eca50be406d50d73040fb.tar.xz
host.fuwn.me-3bd8d119ba88e940932eca50be406d50d73040fb.zip
Refactor a bit since we globally catch API exceptions
Diffstat (limited to 'src/site/pages/login.vue')
-rw-r--r--src/site/pages/login.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/site/pages/login.vue b/src/site/pages/login.vue
index 6e0be3e..d4f376f 100644
--- a/src/site/pages/login.vue
+++ b/src/site/pages/login.vue
@@ -98,7 +98,10 @@ export default {
async login() {
if (this.isLoading) return;
if (!this.username || !this.password) {
- this.$showToast('Please fill both fields before attempting to log in.', true);
+ this.$store.dispatch('alert', {
+ text: 'Please fill both fields before attempting to log in.',
+ error: true
+ });
return;
}
this.isLoading = true;
@@ -114,7 +117,7 @@ export default {
this.redirect();
} catch (error) {
- this.$onPromiseError(error);
+ //
} finally {
this.isLoading = false;
}