mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 14:52:09 +03:00
fix(usage): correct MiniMax token plan quota display (#1642)
Integrated into release/v3.7.1 — fixes inverted MiniMax quota display for token_plan/remains endpoint and rounds floating-point percentages.
This commit is contained in:
@@ -611,9 +611,10 @@ export default function ProviderLimits() {
|
||||
<div className="text-xs text-text-muted italic">{quota.message}</div>
|
||||
) : quota?.quotas?.length > 0 ? (
|
||||
quota.quotas.map((q, i) => {
|
||||
const remainingPercentage = q.unlimited
|
||||
const remainingPercentageRaw = q.unlimited
|
||||
? 100
|
||||
: (q.remainingPercentage ?? calculatePercentage(q.used, q.total));
|
||||
const remainingPercentage = Math.round(remainingPercentageRaw);
|
||||
const colors = getBarColor(remainingPercentage);
|
||||
const cd = formatCountdown(q.resetAt);
|
||||
const shortName = formatQuotaLabel(q.name);
|
||||
|
||||
Reference in New Issue
Block a user