diff --git a/public/index.html b/public/index.html index 7867e61..3dc8dd6 100644 --- a/public/index.html +++ b/public/index.html @@ -112,6 +112,22 @@ + + + diff --git a/public/routes/login.js b/public/routes/login.js index 068bd04..9896930 100644 --- a/public/routes/login.js +++ b/public/routes/login.js @@ -6,7 +6,6 @@ Vue.component('login-panel', { Login - Eingeloggt bleiben + Versuche es nochmal. - + `, - - - `, data: function () { return { user: "name", pwd:"password", + showError:false, }; }, methods: { - logIn(event){ - this.$emit('clicked', true) + checkData(){ + if(this.user === "name" && this.pwd === "password"){ + console.log("correct"); + this.$parent.close(); + }else{ + console.log("wrong"); + this.showError=true; + } }, - closeLogin (event) { - this.$emit('clicked', false) - } + logIn(){ + $parent.close(); + }, }, - mounted: function () { - //$(".loginModal").modal ('show'); - }, }); diff --git a/public/routes/profil.js b/public/routes/profil.js index 8006e39..961b908 100644 --- a/public/routes/profil.js +++ b/public/routes/profil.js @@ -7,32 +7,26 @@ const ProfilRouter = { :key="profil.id" :profil="profil" > - Logout + Logout - - - Login - - + + + Login + - + `, data: function () { return { - isModalActive: false, + showLoginModal: false, + isAuthentified: false, profilcard: _profilcard, - - }; - }, - methods: { - checkAuthentication (value) { - this.showLoginModal = value; - this.isAuthentified = !this.isAuthentified; - }, + }; }, };
Login