From d98a36b0600e4616d03b24962fda78e8f0a2b4e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Aug 2026 16:01:48 +0800 Subject: [PATCH] fix(user): rebuild badge modal ajax --- assets/css/frontend/medal.css | 12 +++++++++--- src/User/Badges.php | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/css/frontend/medal.css b/assets/css/frontend/medal.css index 2003898c..ed2cb382 100644 --- a/assets/css/frontend/medal.css +++ b/assets/css/frontend/medal.css @@ -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; } diff --git a/src/User/Badges.php b/src/User/Badges.php index e5d00187..f95cf79f 100644 --- a/src/User/Badges.php +++ b/src/User/Badges.php @@ -457,7 +457,7 @@ class Badges { $icon = esc_url((string) ($item['icon_url'] ?? '')); $label = esc_attr((string) ($item['label'] ?? __('徽章', 'aksrt'))); if ($icon !== '') { - return ''; + return '' . $label . ''; } return ''; }