diff --git a/core/frontend/src/account-page.css b/core/frontend/src/account-page.css index 6677cd1..eb43601 100644 --- a/core/frontend/src/account-page.css +++ b/core/frontend/src/account-page.css @@ -166,6 +166,16 @@ .bill-pager .pages button.active { background: var(--heat); color: var(--accent-white); border-color: var(--heat); font-weight: 600; } .bill-pager .pages button:disabled { opacity: .4; cursor: not-allowed; } .bill-pager .pages .ellipsis { min-width: 20px; height: 28px; display: inline-flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; color: var(--black-alpha-32); font-family: var(--font-mono); font-size: 12px; user-select: none; } + /* row40:跳页输入框 */ + .bill-pager .bill-jump { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--black-alpha-48); } + .bill-pager .bill-jump input { width: 48px; height: 28px; padding: 0 6px; border: 1px solid var(--border-muted); border-radius: var(--r-sm); background: var(--surface); font-family: var(--font-mono); font-size: 12px; color: var(--accent-black); text-align: center; } + .bill-pager .bill-jump input:focus { outline: none; border-color: var(--heat); } + .bill-pager .bill-jump button { min-width: 40px; height: 28px; padding: 0 10px; border: 1px solid var(--border-muted); border-radius: var(--r-sm); background: var(--surface); font-family: var(--font-mono); font-size: 12px; color: var(--black-alpha-56); cursor: pointer; transition: border-color var(--t-base), color var(--t-base); } + .bill-pager .bill-jump button:hover:not(:disabled) { border-color: var(--black-alpha-32); color: var(--accent-black); } + .bill-pager .bill-jump button:disabled { opacity: .4; cursor: not-allowed; } + /* row39:详情列过长不撑行 —— 截断省略,状态列不换行(避免「成功」被挤换行) */ + .billing-table .bill-detail { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + .billing-table .bill-status { white-space: nowrap; } .billing-table .progress-mini { width: 80px; height: 4px; background: var(--background-lighter); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; } .billing-table .progress-mini > span { display: block; height: 100%; background: var(--heat); } diff --git a/core/frontend/src/routes/account.tsx b/core/frontend/src/routes/account.tsx index 1324f14..14c5366 100644 --- a/core/frontend/src/routes/account.tsx +++ b/core/frontend/src/routes/account.tsx @@ -152,6 +152,13 @@ export function AccountPage({ billing, projects, onRecharge }: { }, [billPage, reloadFlag]); const billTotalPages = Math.max(1, Math.ceil(ledgerCount / BILLS_PER_PAGE)); const safeBillPage = Math.min(billPage, billTotalPages); + // row40:跳页输入框 —— 输入页码回车/点「跳转」即钳到 [1,总页数] 并翻页 + const [billJump, setBillJump] = useState(""); + function gotoBillPage() { + const n = parseInt(billJump, 10); + if (!Number.isNaN(n)) setBillPage(Math.min(billTotalPages, Math.max(1, n))); + setBillJump(""); + } const selectedCard = RECHARGE.find((item) => item.amt === recharge); const effectiveAmount = Number(customAmt) > 0 ? Number(customAmt) : recharge; @@ -422,11 +429,11 @@ export function AccountPage({ billing, projects, onRecharge }: {