Skip to content

Commit

Permalink
Add username to user tab in masthead
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed May 30, 2024
1 parent 879a0fd commit 135c44d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/components/Masthead/Masthead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import MastheadDropdown from "./MastheadDropdown";
import MastheadItem from "./MastheadItem";
import QuotaMeter from "./QuotaMeter";
const { isAnonymous } = storeToRefs(useUserStore());
const { isAnonymous, currentUser } = storeToRefs(useUserStore());
const router = useRouter();
const { config, isConfigLoaded } = useConfig();
Expand Down Expand Up @@ -128,6 +128,7 @@ onMounted(() => {
id="user"
class="loggedin-only"
icon="fa-user"
:title="currentUser.username"
tooltip="User Preferences"
:menu="[
{
Expand Down
1 change: 1 addition & 0 deletions client/src/components/Masthead/MastheadDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ defineProps({
<template v-if="icon" v-slot:button-content>
<span class="sr-only">{{ tooltip || id }}</span>
<span class="fa fa-fw" :class="icon" />
<span>{{ title }}</span>
</template>
<template>
<BDropdownItem v-for="(item, idx) in menu" :key="idx" role="menuitem" @click="item.handler">
Expand Down

0 comments on commit 135c44d

Please sign in to comment.