From 6ac706f9c5521bfd91a3f87405c95ac4d1eb64d1 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Tue, 24 Mar 2026 01:31:10 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20unify=20reset=20time=20format=20to=20rel?= =?UTF-8?q?ative=20(Xh=20Ym=20=ED=9B=84)=20for=20all=20rows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/unified-dashboard.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/unified-dashboard.ts b/src/unified-dashboard.ts index 4e333b8..a1368ae 100644 --- a/src/unified-dashboard.ts +++ b/src/unified-dashboard.ts @@ -613,13 +613,13 @@ async function buildUsageContent(): Promise { ? Math.round(h5.utilization) : Math.round(h5.utilization * 100) : -1, - h5reset: h5 ? formatResetKST(h5.resets_at) : '', + h5reset: h5 ? formatResetRemaining(h5.resets_at) : '', d7pct: d7 ? d7.utilization > 1 ? Math.round(d7.utilization) : Math.round(d7.utilization * 100) : -1, - d7reset: d7 ? formatResetKST(d7.resets_at) : '', + d7reset: d7 ? formatResetRemaining(d7.resets_at) : '', }); } @@ -639,9 +639,9 @@ async function buildUsageContent(): Promise { rows.push({ name: `${label} ${acct.planType}`, h5pct: Math.round(limit.primary.usedPercent), - h5reset: formatResetKST(limit.primary.resetsAt), + h5reset: formatResetRemaining(limit.primary.resetsAt), d7pct: Math.round(limit.secondary.usedPercent), - d7reset: formatResetKST(limit.secondary.resetsAt), + d7reset: formatResetRemaining(limit.secondary.resetsAt), }); } } else { @@ -697,9 +697,10 @@ async function buildUsageContent(): Promise { row.d7pct >= 0 ? `${bar(row.d7pct)} ${String(row.d7pct).padStart(3)}%` : ' — '; - const reset = row.h5reset || row.d7reset - ? ` ${row.h5reset || ''}${row.d7reset ? ` / ${row.d7reset}` : ''}` - : ''; + const reset = + row.h5reset || row.d7reset + ? ` ${row.h5reset || ''}${row.d7reset ? ` / ${row.d7reset}` : ''}` + : ''; lines.push(`${padName(row.name)}${h5} ${d7}${reset}`); } lines.push('```');