diff --git a/src/components/LoginPage.vue b/src/components/LoginPage.vue
index 549a7b95..d7d28753 100644
--- a/src/components/LoginPage.vue
+++ b/src/components/LoginPage.vue
@@ -11,6 +11,7 @@
autocomplete="username"
:placeholder="$t('login.username')"
:aria-label="$t('login.username')"
+ v-on:keyup.enter="login"
/>
@@ -21,6 +22,7 @@
autocomplete="password"
:placeholder="$t('login.password')"
:aria-label="$t('login.password')"
+ v-on:keyup.enter="login"
/>
@@ -49,6 +51,7 @@ export default {
},
methods: {
login() {
+ if (!this.username || !this.password) return;
this.fetchJson(this.authApiUrl() + "/login", null, {
method: "POST",
body: JSON.stringify({
diff --git a/src/components/RegisterPage.vue b/src/components/RegisterPage.vue
index a56653b8..4817a4ac 100644
--- a/src/components/RegisterPage.vue
+++ b/src/components/RegisterPage.vue
@@ -11,6 +11,7 @@
autocomplete="username"
:placeholder="$t('login.username')"
:aria-label="$t('login.username')"
+ v-on:keyup.enter="register"
/>
@@ -21,6 +22,7 @@
autocomplete="password"
:placeholder="$t('login.password')"
:aria-label="$t('login.password')"
+ v-on:keyup.enter="register"
/>
@@ -49,6 +51,7 @@ export default {
},
methods: {
register() {
+ if (!this.username || !this.password) return;
this.fetchJson(this.authApiUrl() + "/register", null, {
method: "POST",
body: JSON.stringify({