fix(nav): show worn badge beside user name

This commit is contained in:
2026-08-11 19:48:44 +08:00
parent bdbd85e434
commit 7d12fc5508
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -231,7 +231,8 @@
max-width: 100%;
}
.sub-user-box .user-right .aksrt-user-level-icon,
.sub-user-box .user-right .aksrt-identity-medal {
.sub-user-box .user-right .aksrt-identity-medal,
.sub-user-box .user-right .aksrt-header-user-medal {
height: 1em;
vertical-align: -.12em;
flex: 0 0 auto;
+4 -1
View File
@@ -155,6 +155,9 @@ if (!function_exists('aksrt_header_user_box_html')) :
$level_badge = (class_exists('\AKSRT\User\Level') && method_exists('\AKSRT\User\Level', 'get_badge_html'))
? \AKSRT\User\Level::get_badge_html($user_id, 'aksrt-user-level-icon--header')
: '';
$medal_badge = function_exists('aksrt_get_worn_medal_icon')
? aksrt_get_worn_medal_icon($user_id, 'aksrt-header-user-medal')
: '';
$certification_badge = '';
if (function_exists('aksrt_get_user_identity_signals')) {
foreach (aksrt_get_user_identity_signals($user_id) as $signal) {
@@ -238,7 +241,7 @@ if (!function_exists('aksrt_header_user_box_html')) :
$con .= $avatar;
$con .= '<div class="user-right flex flex1 ac jsb ml10">';
$con .= '<div class="flex1" style="max-width: calc(100% - 40px);"><b>'
. '<span class="display-name text-ellipsis">' . esc_html($display_name) . '</span>' . $vip_badge . $certification_badge . $level_badge
. '<span class="display-name text-ellipsis">' . esc_html($display_name) . '</span>' . $vip_badge . $medal_badge . $certification_badge . $level_badge
. '</b><div class="px12 muted-2-color text-ellipsis">' . esc_html($desc) . '</div></div>';
$con .= '</div>';
$con .= $msg_icon;