From 24642ca1a834065294da623913228009a3857eec Mon Sep 17 00:00:00 2001 From: Xenia Date: Tue, 16 Apr 2019 21:21:35 +0200 Subject: [PATCH] Log-in/Log-out prototyp --- public/index.html | 6 ------ public/routes/login.js | 18 +++++++++++++----- public/routes/profil.js | 36 ++++++++++++++++++++++++++++++------ 3 files changed, 43 insertions(+), 17 deletions(-) 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; + }, }, };