From b930bc61e472bba0932eaf321363541eb74b1998 Mon Sep 17 00:00:00 2001 From: argszero Date: Sat, 22 Aug 2026 10:26:42 +0800 Subject: [PATCH] fix(ui): transaction table filter row height + drop token column filters (rants 2026-08-22T10:11:48/10:12:57) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Constrain .th-filter/select.th-filter to a fixed height (28px, line-height:1) and align filter-row cells to top, so the native select's intrinsic height no longer stretches the auto-layout row to 236px in the transaction table. Per host follow-up (10:12:57), remove the number-range filter from the four token columns (input/cached/output/tokens) — keep their sort and right-align so the filter row is compact; the time/type/model/key/pts/status filters remain. Gates: 139/139 cargo test + fmt + clippy + node --check all green. --- ui/css/style.css | 11 +++++++++++ ui/index.html | 10 +++++----- ui/js/app.js | 8 ++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ui/css/style.css b/ui/css/style.css index d1cca21..07faaf6 100644 --- a/ui/css/style.css +++ b/ui/css/style.css @@ -474,6 +474,17 @@ mark { .th-filter:focus { border-color: var(--accent); } .range-filter { display: flex; gap: 4px; } .range-filter .th-filter { min-width: 0; width: 100%; } +/* 筛选行定高(rant 2026-08-22T10:11:48:select 固有高度在 table-layout:auto 下撑高整行至 236px): + 约束各筛选控件的 height / line-height 消除 select 撑高,单元格顶部对齐,整行自然收敛 */ +.table thead tr:last-child th, +.table thead tr:last-child td { + vertical-align: top; +} +.table .th-filter, +.table select.th-filter { + height: 28px; + line-height: 1; +} .pager-size { display: flex; align-items: center; diff --git a/ui/index.html b/ui/index.html index 01c4db5..674c7d0 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,7 +5,7 @@ AITokenPool - + @@ -673,9 +673,9 @@

使用模型

- - - - + + + + diff --git a/ui/js/app.js b/ui/js/app.js index d0bf53b..055e11d 100644 --- a/ui/js/app.js +++ b/ui/js/app.js @@ -1173,13 +1173,13 @@ render: (t) => t.type === "earn" ? '' + T("tx.type.earn") + "" : t.type === "consume" ? '' + T("tx.type.consume") + "" : t.type === "gift" ? '' + T("tx.type.gift") + "" : '' + esc(txType(t.type)) + "" }, { key: "model", title: () => T("tx.col.model"), sort: "string", filter: "text" }, { key: "key", title: () => T("tx.col.key"), sort: "string", filter: "text" }, - { key: "input", title: () => T("tx.col.input"), sort: "number", filter: "number-range", align: "num", + { key: "input", title: () => T("tx.col.input"), sort: "number", align: "num", render: (t) => '' + t.inputTokens + "" }, - { key: "cached", title: () => T("tx.col.cached"), sort: "number", filter: "number-range", align: "num", + { key: "cached", title: () => T("tx.col.cached"), sort: "number", align: "num", render: (t) => '' + t.cachedTokens + "" }, - { key: "output", title: () => T("tx.col.output"), sort: "number", filter: "number-range", align: "num", + { key: "output", title: () => T("tx.col.output"), sort: "number", align: "num", render: (t) => '' + t.outputTokens + "" }, - { key: "tokens", title: () => T("tx.col.tokens"), sort: "number", filter: "number-range", align: "num", + { key: "tokens", title: () => T("tx.col.tokens"), sort: "number", align: "num", render: (t) => '' + t.tokens + "" }, { key: "pts", title: () => T("tx.col.pts"), sort: "number", filter: "number-range", align: "num", render: (t) => '' + (t.pts > 0 ? "+" : "") + D.fmt(t.pts) + "" },