Skip to content

Commit

Permalink
hide avatar tooltip in header
Browse files Browse the repository at this point in the history
  • Loading branch information
bseber committed Oct 25, 2024
1 parent a50d0ad commit f95abd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/main/resources/templates/_navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
data-test-id="navigation-link-users"
>
<svg th:replace="~{icons/users::svg}"></svg>
<th:block th:text="#{navigation.main.users}">Personen</th:block>
<th:block th:text="#{navigation.main.users}"
>Personen</th:block
>
</a>
</li>
<li th:if="${showMainNavigationSettings}">
Expand All @@ -84,7 +86,9 @@
data-test-id="navigation-link-settings"
>
<svg th:replace="~{icons/cog::svg}"></svg>
<th:block th:text="#{navigation.main.settings}">Einstellungen</th:block>
<th:block th:text="#{navigation.main.settings}"
>Einstellungen</th:block
>
</a>
</li>
</ul>
Expand Down Expand Up @@ -167,7 +171,7 @@
>
<span class="inline-flex text-blue-200">
<img
th:replace="~{fragments/avatar::avatar(fullName=${signedInUser.fullName},width='52px',height='52px',className='w-10 h-10 lg:w-9 lg:h-9')}"
th:replace="~{fragments/avatar::avatar(fullName=${signedInUser.fullName},width='52px',height='52px',className='w-10 h-10 lg:w-9 lg:h-9',tooltip=false)}"
alt=""
/>
</span>
Expand All @@ -186,7 +190,7 @@
>
<span class="text-blue-200">
<img
th:replace="~{fragments/avatar::avatar(fullName=${signedInUser.fullName},width='64px',height='64px')}"
th:replace="~{fragments/avatar::avatar(fullName=${signedInUser.fullName},width='64px',height='64px',tooltip=false)}"
alt=""
/>
</span>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/fragments/avatar.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<body>
<img
th:fragment="avatar(fullName,width,height)"
th:with="fallbackAvatarUrl=@{/avatar (name=${fullName})}"
th:with="tooltip=${#objects.nullSafe(tooltip, true)}, fallbackAvatarUrl=@{/avatar (name=${fullName})}"
src="#"
th:src="@{/invalid-avatar-url}"
alt=""
th:alt="${fullName}"
th:alt="${tooltip ? fullName : null}"
class="rounded-full"
th:classappend="${className}"
th:width="${width == null ? '32px' : width}"
Expand Down

0 comments on commit f95abd1

Please sign in to comment.