fix(user): rebuild badge modal ajax

This commit is contained in:
2026-08-19 16:01:48 +08:00
parent 9c827ff493
commit d98a36b060
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -113,6 +113,8 @@
.medal-list {
display: block;
width: auto !important;
margin: 0 !important;
min-width: 0;
padding: 0;
border: 0;
@@ -194,14 +196,18 @@
top: 43px;
left: 0;
right: 0;
bottom: 0;
bottom: auto;
z-index: 0;
max-width: 305px;
height: auto;
margin: 0 auto;
opacity: 0.5;
pointer-events: none;
}
.medal-single-bg img {
width: 100%;
height: 100%;
object-fit: cover;
height: auto;
object-fit: contain;
}
.medal-single-main { position: relative; }
+1 -1
View File
@@ -457,7 +457,7 @@ class Badges {
$icon = esc_url((string) ($item['icon_url'] ?? ''));
$label = esc_attr((string) ($item['label'] ?? __('徽章', 'aksrt')));
if ($icon !== '') {
return '<img' . (function_exists('aksrt_get_lazy_attr') ? aksrt_get_lazy_attr('lazy_other', $icon, $class) : ' src="' . $icon . '" class="' . esc_attr($class) . '"') . ' alt="' . $label . '">';
return '<img src="' . $icon . '" class="' . esc_attr($class) . '" alt="' . $label . '" decoding="async">';
}
return '<span class="medal-icon medal-icon--fa"><i class="fa fas fa-trophy" aria-hidden="true"></i></span>';
}