From e71a5b7585fafeed0ed5f6fa0c8c07d12f1f9eae Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Aug 2026 09:16:29 +0800 Subject: [PATCH] refactor: drop order quick shortcuts, keep My Orders tile only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per feedback the 待支付/售后 shortcut row is not wanted. Remove the nested quick grid, delete the now-orphaned sidebar-orders renderer, and strip its uc-order-grid CSS. 我的订单 remains a single tile in the 我的服务 grid. --- assets/css/routes/user-center/shell.css | 59 ------------------- .../user-center-renderers/sidebar-nav.php | 3 - .../user-center-renderers/sidebar-orders.php | 50 ---------------- 3 files changed, 112 deletions(-) delete mode 100644 inc/helpers/user-center-renderers/sidebar-orders.php diff --git a/assets/css/routes/user-center/shell.css b/assets/css/routes/user-center/shell.css index ecd2aa0d..f6494df8 100644 --- a/assets/css/routes/user-center/shell.css +++ b/assets/css/routes/user-center/shell.css @@ -450,61 +450,6 @@ body.aksrt-user-center .uc-content, font-size: 11px; } -.uc-order-grid { - display: grid; - grid-template-columns: repeat(5, minmax(0, 1fr)); - gap: 4px; -} - -/* Order quick shortcuts nested inside the 我的服务 section. */ -.uc-order-grid--quick { - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 8px; - margin-top: 14px; - padding-top: 14px; - border-top: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.06)); -} - -.uc-order-grid__item { - display: flex; - flex-direction: column; - align-items: center; - gap: 7px; - min-width: 0; - padding: 5px 0 2px; - color: var(--color-ink-3); - font-size: 11px; - text-align: center; - text-decoration: none; -} - -.uc-order-grid__item:hover { - color: var(--color-primary); -} - -.uc-order-grid__icon { - position: relative; - display: grid; - place-items: center; - width: 38px; - height: 38px; - border-radius: 13px; - background: color-mix(in srgb, var(--color-primary) 9%, var(--surface-2)); - color: var(--color-primary); - font-size: 16px; - transition: transform 0.2s ease, background-color 0.2s ease; -} - -.uc-order-grid__item:nth-child(2) .uc-order-grid__icon { color: #a56b10; background: rgba(245, 158, 11, 0.12); } -.uc-order-grid__item:nth-child(3) .uc-order-grid__icon { color: #15806c; background: rgba(16, 185, 129, 0.12); } -.uc-order-grid__item:nth-child(4) .uc-order-grid__icon { color: #7c4ed8; background: rgba(139, 92, 246, 0.12); } -.uc-order-grid__item:nth-child(5) .uc-order-grid__icon { color: #d04b65; background: rgba(244, 63, 94, 0.11); } - -.uc-order-grid__item:hover .uc-order-grid__icon { - transform: translateY(-2px); -} - -.uc-order-grid__icon small, .uc-service-grid__icon small { position: absolute; top: -5px; @@ -649,7 +594,3 @@ body.aksrt-user-center .uc-content, .uc-service-grid__item.is-active .uc-service-grid__icon { box-shadow: 0 0 0 2px var(--color-primary-soft), 0 5px 14px rgba(15, 23, 42, 0.08); } - -@media (prefers-reduced-motion: reduce) { - .uc-order-grid__icon { transition: none; } -} diff --git a/inc/helpers/user-center-renderers/sidebar-nav.php b/inc/helpers/user-center-renderers/sidebar-nav.php index 63c7a357..ec9e682e 100644 --- a/inc/helpers/user-center-renderers/sidebar-nav.php +++ b/inc/helpers/user-center-renderers/sidebar-nav.php @@ -79,9 +79,6 @@ $render_grid = static function (array $items): void {
- - -
diff --git a/inc/helpers/user-center-renderers/sidebar-orders.php b/inc/helpers/user-center-renderers/sidebar-orders.php deleted file mode 100644 index 1565ee5e..00000000 --- a/inc/helpers/user-center-renderers/sidebar-orders.php +++ /dev/null @@ -1,50 +0,0 @@ -get_stats($order_user_id) - : []; -$order_items = [ - [ - 'label' => __('待支付', 'aksrt'), - 'icon' => 'wallet', - 'tab' => 'pending', - 'count' => (int) ($order_stats['pending'] ?? 0), - ], - [ - 'label' => __('售后', 'aksrt'), - 'icon' => 'undo-alt', - 'tab' => 'after', - 'count' => (int) ($order_stats['refunding'] ?? 0), - ], -]; -?> -
- - - - - 0) : ?> - 99 ? '99+' : (string) $item['count']); ?> - - - - - -