Commit Graph
4 Commits
Author SHA1 Message Date
yetone 044f61f50f usage: a custom balance's card says when it was read, shows each of its amounts on a line of its own and a percent as a meter (#420 by emo172: 余额卡片显示读取时间、百分比进度条) — a balance read from a provider's own Balance URL showed one line, "Balance $2.00 · Today $2.50 · Used 90%", and nothing said how old it was. magpie now hands the card the amounts the user's expression names, each with its label, and a "%" one's share; the Usage page shows each on a line of its own, the user's label quiet and the first amount the larger, "Balance" only where no label was given, and a percent as the quota meter, amber from 90%. Every card that was read says so, "Updated 3 minutes ago" (3分钟前更新), and one standing in for a reading that failed just now says "As of … — couldn't be read just now" (截至 …,暂时无法获取最新用量), allowance cards too. The menu bar panel's Balances show the same amounts and meter and an amber "As of" (截至), and the tray's tooltip adds "as of …, couldn't be read just now". One amount alone reads as it did, and the balance line, the CLI and the expression syntax are unchanged. No balance URL, path or site is added: /api/usage/token and unlimited_quota are one kind of relay's and stay the user's to write. TestBalanceParts, TestTrayUsageText and balance-parts.test.cjs fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; balance-parts, click-scroll, old-webkit, quota-families, panel-usage, tray-usages, balance-fix, usage-refresh, currency, claude-usage-asked pass. 2026-10-01 19:44:44 +08:00
bcb9db9356 fix(gui): 用量文字与提示显示最多一位小数 (#287)
* feat(gui): 订阅用量百分比保留两位小数

Co-authored-by: Codex <codex@openai.com>

* feat(gui): 支持配置订阅用量小数位

Co-authored-by: Codex <codex@openai.com>

* fix(gui): 默认用量百分比保持整数显示

Co-authored-by: Codex <codex@openai.com>

* fix(gui): 整数用量保留原有圆环尺寸

Co-authored-by: Codex <codex@openai.com>

* fix(gui): 按原布局显示用量小数

菜单栏与圆环维持整数;仅在用量文字和提示中为非整数比例显示一位小数。移除小数位配置及相关布局调整。

Co-authored-by: Codex <codex@openai.com>

---------

Co-authored-by: louis.ning <louis.ning@nio.com>
Co-authored-by: Codex <codex@openai.com>
2026-09-30 16:37:23 +08:00
yetone e31a6a15b0 usage: the menu bar's usage is refreshed as often as asked — every 1, 3, 5, 10 or 30 minutes, 3 as before — and reads as used or left as the Usage page does; that choice is a setting now rather than the browser's, so the page, the panel and the menu bar agree, and Settings has it too; a browser's choice from before is carried over once (#122) 2026-09-28 09:27:49 +08:00
yetone 9cbcb681dd tray: a subscription's use can sit beside the icon in the menu bar — Settings → Usage in the menu bar picks one of the Usage page's cards, and its windows' use shows there ("42% · 18%", the shortest window first; a key's balance as it reads), with each window and when it starts again in the tooltip, brought up to date every few minutes from the page's own caches, so the vendors are asked no more often. Windows' tray has no room for text and shows the tooltip only. Asked for on Discord 2026-09-27 19:10:27 +08:00