From fd3f6de51a082dcd72c2ef557747e031ef7b9c4a Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Thu, 9 Jul 2020 02:24:40 +0300 Subject: refactor: refactor most of the admin pages to use the store instead of internal states --- src/site/pages/login.vue | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) (limited to 'src/site/pages/login.vue') diff --git a/src/site/pages/login.vue b/src/site/pages/login.vue index 9e5658d..569e9d9 100644 --- a/src/site/pages/login.vue +++ b/src/site/pages/login.vue @@ -25,20 +25,32 @@ @keyup.enter.native="login" /> -

- - Don't have an account? - - Registration is closed at the moment - -

+

+ +

+
+
+ + Don't have an account? + + Registration is closed at the moment +
+
+ +
+

+ + Login + +

+
+
@@ -99,10 +111,7 @@ export default { const { username, password } = this; if (!username || !password) { - this.$store.dispatch('alert/set', { - text: 'Please fill both fields before attempting to log in.', - error: true, - }); + this.$notifier.error('Please fill both fields before attempting to log in.'); return; } @@ -113,7 +122,7 @@ export default { this.redirect(); } } catch (e) { - this.$store.dispatch('alert/set', { text: e.message, error: true }, { root: true }); + this.$notifier.error(e.message); } finally { this.isLoading = false; } -- cgit v1.2.3