improve user menu

This commit is contained in:
Thomas Amland
2020-07-31 18:39:29 +02:00
parent b82172adf6
commit 6ad7d8d33d
4 changed files with 32 additions and 6 deletions
+18 -3
View File
@@ -9,9 +9,21 @@
<SearchForm/>
<template v-if="username">
<b-dropdown variant="link" right :text="username">
<b-dropdown variant="link" right no-caret>
<template #button-content>
<b-avatar variant="secondary">
<Icon icon="person-fill"/>
</b-avatar>
</template>
<b-dropdown-text>
{{ server }}
</b-dropdown-text>
<b-dropdown-text>
{{ username }}
</b-dropdown-text>
<b-dropdown-divider/>
<b-dropdown-item-button @click="logout">
<Icon icon="box-arrow-right"/> Logout
Log out
</b-dropdown-item-button>
</b-dropdown>
</template>
@@ -27,7 +39,10 @@ import SearchForm from '@/search/SearchForm.vue';
SearchForm,
},
computed: {
...mapState(["username"])
...mapState([
"server",
"username",
])
},
methods: {
...mapMutations([