From 8f1bbf24115167abc9ec08165959c4a926e49196 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Oct 2026 16:29:46 +0800 Subject: [PATCH] fix(admin): replace VIP expiry sort glyph with stacked CSS carets Co-Authored-By: Claude Fable 5 --- assets/css/admin/vip.css | 21 +++++++++++++++++---- src/Admin/Native/UsersMenusVipView.php | 6 +++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/assets/css/admin/vip.css b/assets/css/admin/vip.css index 532a9ad2..ece9992c 100644 --- a/assets/css/admin/vip.css +++ b/assets/css/admin/vip.css @@ -41,14 +41,27 @@ .aksrt-vip-sort { display: inline-flex; align-items: center; - gap: 2px; + gap: 6px; color: inherit; text-decoration: none; } -.aksrt-vip-sort .dashicons { width: 16px; height: 16px; font-size: 14px; line-height: 16px; color: var(--an-muted); } .aksrt-vip-sort:hover, -.aksrt-vip-sort.is-active, -.aksrt-vip-sort.is-active .dashicons { color: var(--an-primary); } +.aksrt-vip-sort.is-asc, +.aksrt-vip-sort.is-desc { color: var(--an-primary); } +/* 上下两个 CSS 三角,当前方向高亮;不依赖图标字形的朝向。 */ +.aksrt-vip-sort__icon { display: inline-flex; flex-direction: column; gap: 2px; } +.aksrt-vip-sort__icon i { + display: block; + width: 0; + height: 0; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + color: #c9cdd4; +} +.aksrt-vip-sort__icon i:first-child { border-bottom: 5px solid currentColor; } +.aksrt-vip-sort__icon i:last-child { border-top: 5px solid currentColor; } +.aksrt-vip-sort.is-asc .aksrt-vip-sort__icon i:first-child, +.aksrt-vip-sort.is-desc .aksrt-vip-sort__icon i:last-child { color: var(--an-primary); } .aksrt-vip-history .column-time { width: 140px; } .aksrt-vip-history .column-user { width: 22%; } .aksrt-vip-history .column-reason { width: 26%; word-break: break-word; } diff --git a/src/Admin/Native/UsersMenusVipView.php b/src/Admin/Native/UsersMenusVipView.php index de4590c1..4fa69fc7 100644 --- a/src/Admin/Native/UsersMenusVipView.php +++ b/src/Admin/Native/UsersMenusVipView.php @@ -145,9 +145,9 @@ trait UsersMenusVipView { private function vip_sort_link(array $filters): string { $active = $filters['orderby'] === 'expires'; $next = $active && $filters['order'] === 'ASC' ? 'DESC' : 'ASC'; - $arrow = $active ? ($filters['order'] === 'ASC' ? 'dashicons-arrow-up-alt2' : 'dashicons-arrow-down-alt2') : 'dashicons-sort'; - return '' - . esc_html__('到期时间', 'aksrt') . ''; + $state = $active ? ($filters['order'] === 'ASC' ? ' is-asc' : ' is-desc') : ''; + return '' + . esc_html__('到期时间', 'aksrt') . ''; } private function render_vip_row(array $row): void {