Add tooltip to header avatar menu

- Add 'showProfileNameTitle' to profile avatar.
This commit is contained in:
Wolfgang Huß 2023-03-23 07:51:19 +01:00
parent ee6a7dab48
commit 4c0469f61a
4 changed files with 20 additions and 2 deletions

View File

@ -11,7 +11,15 @@
"
@click.prevent="toggleMenu"
>
<profile-avatar :profile="user" size="small" />
<profile-avatar
:profile="user"
size="small"
:showProfileNameTitle="false"
v-tooltip="{
content: $t('header.avatarMenu.button.tooltip'),
placement: 'bottom-start',
}"
/>
<base-icon class="dropdown-arrow" name="angle-down" />
</a>
</template>

View File

@ -8,7 +8,7 @@
:src="profile.avatar | proxyApiUrl"
class="image"
:alt="profile.name"
:title="profile.name"
:title="showProfileNameTitle ? profile.name : ''"
@error="$event.target.style.display = 'none'"
/>
</div>
@ -29,6 +29,10 @@ export default {
type: Object,
default: null,
},
showProfileNameTitle: {
type: Boolean,
default: true,
},
},
computed: {
isAnonymous() {

View File

@ -510,6 +510,9 @@
},
"header": {
"avatarMenu": {
"button": {
"tooltip": "Mein Profil"
},
"Groups": "Gruppen",
"myProfile": "Mein Profil"
}

View File

@ -510,6 +510,9 @@
},
"header": {
"avatarMenu": {
"button": {
"tooltip": "My profile"
},
"Groups": "Groups",
"myProfile": "My profile"
}