From 4aea9a30cceb9cccacf06e5cfefa71152229dd4d Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 26 Sep 2026 12:43:12 +0800 Subject: [PATCH] =?UTF-8?q?gui:=20a=20subscription's=20quota=20says=20it?= =?UTF-8?q?=20is=20used=20=E2=80=94=20the=20card=20showed=2047%=20where=20?= =?UTF-8?q?Codex=20shows=2053%=20left=20of=20the=20same=20window,=20and=20?= =?UTF-8?q?it=20read=20as=20the=20two=20disagreeing=20(#81);=20it=20is=20n?= =?UTF-8?q?ow=20"47%=20used"=20(=E5=B7=B2=E7=94=A8=2047%)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/gui/assets/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index 7fcd050fe..7673f6e85 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -3105,7 +3105,7 @@ function accountQuota(data, user) { return line; } // the two rolling windows fit a line; the per-model ones go in its tooltip - line.title = q.windows.slice(2).map((w) => t(w.name) + " " + (w.display || Math.round(w.used) + "%")).join(" · "); + line.title = q.windows.slice(2).map((w) => t(w.name) + " " + (w.display || t("{n} used", { n: Math.round(w.used) + "%" }))).join(" · "); for (const w of q.windows.slice(0, 2)) { const used = Math.max(0, Math.min(100, w.used)); const m = el("span", "aq-w" + (used >= 90 ? " full" : "")); @@ -3113,7 +3113,7 @@ function accountQuota(data, user) { const fill = el("i"); fill.style.width = used + "%"; track.append(fill); - m.append(el("span", "aq-n", t(w.name)), track, el("b", "", w.display || Math.round(w.used) + "%")); + m.append(el("span", "aq-n", t(w.name)), track, el("b", "", w.display || t("{n} used", { n: Math.round(w.used) + "%" }))); if (w.resetsAt) { const at = new Date(w.resetsAt); m.title = t("Resets {when}", { when: at.toLocaleString() }); @@ -3514,7 +3514,7 @@ function quotaWindows(sub) { for (const w of sub.windows) { const quota = el("div", "quota"); const labels = el("div", "quota-labels"); - labels.append(el("span", "", t(w.name)), el("b", "", w.display || `${Math.round(w.used)}%`)); + labels.append(el("span", "", t(w.name)), el("b", "", w.display || t("{n} used", { n: `${Math.round(w.used)}%` }))); const track = el("div", "quota-track"); const fill = el("i"); fill.style.width = `${Math.max(0, Math.min(100, w.used))}%`;