fix(admin): replace VIP expiry sort glyph with stacked CSS carets

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-30 16:29:46 +08:00
1 parent 117da19f16
commit 8f1bbf2411
2 files changed
+20 -7

No files matched your search

+17 -4
View File
@@ -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; }
+3 -3
View File
@@ -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 '<a class="aksrt-vip-sort' . ($active ? ' is-active' : '') . '" href="' . esc_url($this->vip_list_url($filters, ['orderby' => 'expires', 'order' => $next])) . '">'
. esc_html__('到期时间', 'aksrt') . '<span class="dashicons ' . esc_attr($arrow) . '" aria-hidden="true"></span></a>';
$state = $active ? ($filters['order'] === 'ASC' ? ' is-asc' : ' is-desc') : '';
return '<a class="aksrt-vip-sort' . $state . '" href="' . esc_url($this->vip_list_url($filters, ['orderby' => 'expires', 'order' => $next])) . '">'
. esc_html__('到期时间', 'aksrt') . '<span class="aksrt-vip-sort__icon" aria-hidden="true"><i></i><i></i></span></a>';
}
private function render_vip_row(array $row): void {