Files
wordpress-theme-aksrt/assets/css/admin/orders.css
T
kate522andClaude Fable 5 b32b56f8bc feat(admin): redesign order list and detail workspace
Replace the type/method tab rows with status views backed by one GROUP BY
count, move filters into a single toolbar card, show gateway names, keep
list context across detail and actions, and split the detail page into a
summary/timeline column and an actions/buyer/note sidebar. Confirmations
move to admin-orders.js; PayOrders splits into flat List/Detail traits.

Remove dead code: unused Order AJAX endpoints and init(), get_orders_count(),
shipping flash codes, and the legacy raw-note fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-31 14:03:57 +08:00

89 lines
6.2 KiB
CSS

/* 订单明细(aksrt_orders):列表 + 详情。复用 native-ui.css 的 --an-* 令牌,规则限定在 .aksrt-orders-page 下。 */
/* ---------- 状态视图 ---------- */
.aksrt-orders-page .aksrt-orders-views { display: flex; width: fit-content; max-width: 100%; }
/* ---------- 筛选栏 ---------- */
.aksrt-orders-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.aksrt-orders-filters label { display: inline-flex; margin: 0; }
.aksrt-orders-filters__search { flex: 1 1 240px; }
.aksrt-orders-filters__search input { width: 100%; }
.aksrt-orders-filters__range { display: inline-flex; align-items: center; gap: 6px; color: var(--an-muted); }
.aksrt-orders-page .aksrt-orders-filters__user { width: 96px; }
.aksrt-orders-filters__submit { display: inline-flex; gap: 8px; }
.aksrt-orders-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.aksrt-orders-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; color: var(--an-primary); background: var(--an-primary-soft); border-radius: 999px; font-size: 12px; line-height: 20px; }
.aksrt-orders-chip a { display: inline-flex; color: inherit; border-radius: 50%; text-decoration: none; }
.aksrt-orders-chip a:hover,
.aksrt-orders-chip a:focus { color: var(--an-danger); }
.aksrt-orders-chip .dashicons { width: 16px; height: 16px; font-size: 16px; }
/* ---------- 订单表 ---------- */
.aksrt-orders-table { min-width: 1080px; table-layout: fixed; }
.aksrt-orders-table .column-order { width: 19%; }
.aksrt-orders-table .column-user { width: 14%; }
.aksrt-orders-table .column-product { width: 20%; }
.aksrt-orders-table .column-amount { width: 13%; }
.aksrt-orders-table .column-status { width: 11%; }
.aksrt-orders-table .column-paid { width: 11%; }
.aksrt-orders-table .column-actions { width: 12%; }
.aksrt-orders-table td { vertical-align: top; }
.aksrt-orders-number { color: var(--an-text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; text-decoration: none; word-break: break-all; }
a.aksrt-orders-number:hover,
a.aksrt-orders-number:focus { color: var(--an-primary); }
.aksrt-orders-product { display: block; color: var(--an-text); font-weight: 500; overflow-wrap: anywhere; }
.aksrt-orders-sub { margin-top: 4px; color: var(--an-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
/* 行内动作:每个按钮是一个独立 POST 表单 */
.aksrt-orders-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.aksrt-orders-action { display: inline-flex; margin: 0; }
.aksrt-orders-actions.is-stacked { flex-direction: column; }
.aksrt-orders-actions.is-stacked .aksrt-orders-action,
.aksrt-orders-actions.is-stacked .button { width: 100%; justify-content: center; }
.aksrt-orders-action .button[disabled] { opacity: .6; cursor: progress; }
/* ---------- 详情 ---------- */
.aksrt-orders-detail__header .aksrt-native-header__desc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aksrt-orders-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.aksrt-orders-detail__main,
.aksrt-orders-detail__side { min-width: 0; }
.aksrt-orders-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 20px; margin: 0; }
.aksrt-orders-dl > div { min-width: 0; }
.aksrt-orders-dl dt { margin: 0 0 4px; color: var(--an-muted); font-size: 12px; }
.aksrt-orders-dl dd { margin: 0; color: var(--an-text); overflow-wrap: anywhere; }
.aksrt-orders-dl.is-compact { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.aksrt-orders-amounts { margin-top: 18px; padding: 12px 16px; background: var(--an-bg-soft); border-radius: var(--an-radius-sm); }
.aksrt-orders-amounts__row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.aksrt-orders-amounts__row.is-total { margin-top: 4px; padding-top: 10px; color: var(--an-text); border-top: 1px solid var(--an-border); }
.aksrt-orders-amounts__row.is-total:first-child { margin-top: 0; padding-top: 4px; border-top: 0; }
.aksrt-orders-amounts__row.is-total .aksrt-native-amount { font-size: 18px; }
.aksrt-orders-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.aksrt-orders-timeline__item { --an-tone: var(--an-muted); position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 0 0 14px 22px; }
.aksrt-orders-timeline__item:last-child { padding-bottom: 0; }
.aksrt-orders-timeline__item::before { content: ""; position: absolute; top: 5px; left: 0; width: 10px; height: 10px; background: var(--an-tone); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--an-tone) 18%, transparent); }
.aksrt-orders-timeline__item:not(:last-child)::after { content: ""; position: absolute; top: 18px; bottom: 2px; left: 4px; width: 2px; background: var(--an-border-soft); }
.aksrt-orders-timeline__item.is-success { --an-tone: var(--an-primary); }
.aksrt-orders-timeline__item.is-info { --an-tone: var(--an-info); }
.aksrt-orders-timeline__item.is-warning { --an-tone: var(--an-warning); }
.aksrt-orders-timeline__item.is-planned::before { background: #fff; border: 2px dashed var(--an-tone); box-sizing: border-box; box-shadow: none; }
.aksrt-orders-timeline__label { color: var(--an-text); font-weight: 500; }
.aksrt-orders-timeline time { color: var(--an-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.aksrt-orders-snapshot { max-height: 360px; margin: 0; padding: 12px; overflow: auto; color: var(--an-text); font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; background: var(--an-bg-soft); border-radius: var(--an-radius-sm); }
.aksrt-orders-buyer .aksrt-native-user img { width: 36px; height: 36px; }
.aksrt-orders-note textarea { width: 100%; }
.aksrt-orders-note .aksrt-native-form-foot { margin-top: 10px; }
.aksrt-orders-detail__side .aksrt-native-callout { margin-bottom: 12px; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
.aksrt-orders-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 782px) {
.aksrt-orders-filters__search { flex-basis: 100%; }
.aksrt-orders-filters__range { flex-wrap: wrap; }
}