diff --git a/public/index.html b/public/index.html index b6c6c91..274bbad 100644 --- a/public/index.html +++ b/public/index.html @@ -86,13 +86,11 @@
-
-
@@ -125,12 +123,8 @@ router, el: '#api', data: { - showLoginModal: false, }, methods: { - onClickChild (value) { - this.showLoginModal= value; - }, } }); diff --git a/public/routes/login.js b/public/routes/login.js index f11ad58..b6972b5 100644 --- a/public/routes/login.js +++ b/public/routes/login.js @@ -8,14 +8,18 @@ Vue.component('login-panel', {
@@ -28,6 +32,10 @@ Vue.component('login-panel', { }; }, methods: { + logIn(event){ + this.$emit('clicked', true) + }, + closeLogin (event) { this.$emit('clicked', false) } diff --git a/public/routes/profil.js b/public/routes/profil.js index a3a30a9..72de5ea 100644 --- a/public/routes/profil.js +++ b/public/routes/profil.js @@ -1,17 +1,41 @@ const ProfilRouter = { template: `
- +
+ + +
+
+ + +
`, data: function () { - return { profilcard: _profilcard }; + return { + profilcard: _profilcard, + showLoginModal: false, + isAuthentified: false, + }; }, methods: { + closeModal (value) { + this.showLoginModal = value; + this.isAuthentified = !this.isAuthentified; + }, + logIn (value) { + + this.showLoginModal=false; + }, + + logOut () { + + this.isAuthentified=false; + }, }, };