ui: only show displayName when exists

This commit is contained in:
undefined committed 2026-08-29 09:30:50 +00:00
1 parent e137e1940f
commit 2ee34911b7
1 file changed
+1 -1
@@ -57,7 +57,7 @@
</li>
{% endif %}
<li class="nav__list-item" data-dropdown-pos="bottom right" data-dropdown-custom-class="nav__dropdown" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
<a href="{{ url('user_detail', uid=handler.user._id) }}" class="nav__item">{{ handler.user.displayName }} ({{ handler.user.uname }}) <span class="icon icon-expand_more nojs--hide"></span></a>
<a href="{{ url('user_detail', uid=handler.user._id) }}" class="nav__item">{% if handler.user.displayName and handler.user.displayName != handler.user.uname %}{{ handler.user.displayName }} ({{ handler.user.uname }}){% else %}{{ handler.user.uname }}{% endif %} <span class="icon icon-expand_more nojs--hide"></span></a>
<ol class="dropdown-target menu" id="menu-nav-user">
<li class="menu__item">
<a href="{{ url('user_detail', uid=handler.user._id) }}" class="menu__link">