From d023900d7355669b62a0131c7dd2bf96d3ee40d4 Mon Sep 17 00:00:00 2001 From: pawlaczyk Date: Sat, 5 Jan 2019 22:08:36 +0100 Subject: [PATCH] Snackabry do logowania i wylogowania --- frontend/app/src/components/Navbar.vue | 39 ++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/frontend/app/src/components/Navbar.vue b/frontend/app/src/components/Navbar.vue index b0b2a1a..846e82b 100644 --- a/frontend/app/src/components/Navbar.vue +++ b/frontend/app/src/components/Navbar.vue @@ -7,6 +7,20 @@ + + Wylogowano + + clear + + + + + Poprawnie zalogowano + + clear + + + @@ -33,8 +47,9 @@ - - Sign Out + + Wyjdź + Zaloguj exit_to_app @@ -77,7 +92,10 @@ export default { data(){ return{ drawer: false, //niepokazywac na poczatku - snackbar: false + snackbar: false, + snackbarLogout: false, + isLogged: true, + snackbarLogint: false } }, computed:{ @@ -86,9 +104,18 @@ export default { } }, methods:{ - userLogout(){ - //wylogowanie - console.log("wylogowano") + userAction(){ + if(this.isLogged){ + this.snackbarLogout = true + this.isLogged = false + console.log("wylogowano") + } + else{ + this.snackbarLogout = false + this.snackbarLogin = true + this.isLogged = true + console.log("zalogowano") + } } }