From 720ffaf0083564c85a07d66a6d303f34706add41 Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Thu, 2 Jul 2020 02:50:55 +0300 Subject: feat: start refactoring the code to actually use vuex This includes creating multiple stores as needed for components and removing all complex states from components (since all those states should be stored in vuex) --- src/site/pages/login.vue | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) (limited to 'src/site/pages/login.vue') diff --git a/src/site/pages/login.vue b/src/site/pages/login.vue index 514cbc5..3c43755 100644 --- a/src/site/pages/login.vue +++ b/src/site/pages/login.vue @@ -63,6 +63,8 @@ -- cgit v1.2.3 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