From b29c5c58407336b591c9b350f1140102ed03ab25 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 23 Sep 2019 11:30:23 +0200 Subject: [PATCH] Fix logout Closes #171 Signed-off-by: Thomas Citharel --- js/src/components/NavBar.vue | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 5bd6ec8ce..af9dace51 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -20,7 +20,7 @@ {{ currentActor.preferredUsername }} - +
@@ -49,7 +49,9 @@ {{ $t('Administration') }} - {{ $t('Log out') }} + + {{ $t('Log out') }} + @@ -145,9 +147,15 @@ export default class NavBar extends Vue { async logout() { await logout(this.$apollo.provider.defaultClient); + this.$buefy.notification.open({ + message: this.$t('You have been disconnected') as string, + type: 'is-success', + position: 'is-bottom-right', + duration: 5000, + }); if (this.$route.name === RouteName.HOME) return; - return this.$router.push({ name: RouteName.HOME }); + await this.$router.push({ name: RouteName.HOME }); } async setIdentity(identity: IPerson) { @@ -159,8 +167,6 @@ export default class NavBar extends Vue { @import "../variables.scss"; nav { - /*border-bottom: solid 1px #0a0a0a;*/ - .navbar-dropdown .navbar-item { cursor: pointer; @@ -175,6 +181,10 @@ nav { img { max-height: 2.5em; } + + &:hover { + background: whitesmoke; + } } .navbar-item.has-dropdown a.navbar-link figure {