aboutsummaryrefslogtreecommitdiff
path: root/src/site/pages/login.vue
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-09 02:24:40 +0300
committerZephyrrus <[email protected]>2020-07-09 02:24:40 +0300
commitfd3f6de51a082dcd72c2ef557747e031ef7b9c4a (patch)
tree78e655286f6984b171604f3bc15e41eb52b01cef /src/site/pages/login.vue
parentfix: register handler as a plugin (diff)
downloadhost.fuwn.me-fd3f6de51a082dcd72c2ef557747e031ef7b9c4a.tar.xz
host.fuwn.me-fd3f6de51a082dcd72c2ef557747e031ef7b9c4a.zip
refactor: refactor most of the admin pages to use the store instead of internal states
Diffstat (limited to 'src/site/pages/login.vue')
-rw-r--r--src/site/pages/login.vue47
1 files changed, 28 insertions, 19 deletions
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" />
</b-field>
- <p class="control has-addons is-pulled-right">
- <router-link
- v-if="config.userAccounts"
- to="/register"
- class="is-text">
- Don't have an account?
- </router-link>
- <span v-else>Registration is closed at the moment</span>
- <button
- class="button is-primary big ml1"
- @click="login">
- login
- </button>
- </p>
+ <p class="control has-addons is-pulled-right" />
+
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <router-link
+ v-if="config.userAccounts"
+ to="/register"
+ class="is-text">
+ Don't have an account?
+ </router-link>
+ <span v-else>Registration is closed at the moment</span>
+ </div>
+ </div>
+
+ <div class="level-right">
+ <p class="level-item">
+ <b-button
+ size="is-medium"
+ type="is-lolisafe"
+ @click="login">
+ Login
+ </b-button>
+ </p>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -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;
}