diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index ebf4457..e0c66b6 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -2,20 +2,21 @@
+

Login

- +
- +
@@ -24,7 +25,7 @@
-
=8 + && !this.$store.state.auth.isAuthenticated) { + return true; + } + return false; + }, }, methods: { login: function () { @@ -99,7 +99,7 @@ console.log("GET /api/login/ - json: " + JSON.stringify(data)); - this.$axios.post(process.env.USER_API+'/account/login', data) + this.$axios.post(process.env.USER_API + '/account/login', data) .then((response) => { console.log("GET/POST /api/login/ - response: "); console.log(response.data); @@ -127,8 +127,8 @@ console.log(error.config); this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {message: msg, title: title,}); }).finally(() => { - this.loading = false; - this.evalAuthentication(); + this.loading = false; + this.evalAuthentication(); }) }, evalAuthentication: function () { @@ -141,6 +141,10 @@ localStorage.removeItem('userToken'); this.evalAuthentication(); }, + validateEmail(email) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(String(email).toLowerCase()); + }, }, }; diff --git a/frontend/src/pages/Register.vue b/frontend/src/pages/Register.vue index 868d5b7..1b364ea 100644 --- a/frontend/src/pages/Register.vue +++ b/frontend/src/pages/Register.vue @@ -2,6 +2,7 @@
+

Registrierung