fix(quota): support z.ai credit limits
This commit is contained in:
@@ -35,6 +35,11 @@ export const UsageProviderCards: React.FC<{
|
||||
<span className="min-w-0 flex-1 truncate typography-ui-label font-medium text-foreground">
|
||||
{group.providerName}
|
||||
</span>
|
||||
{group.planLabel ? (
|
||||
<span className="shrink-0 typography-micro capitalize text-muted-foreground">
|
||||
{group.planLabel}
|
||||
</span>
|
||||
) : null}
|
||||
{group.status && group.rows.length === 0 ? (
|
||||
<span className="shrink-0 truncate typography-micro text-muted-foreground">{group.status}</span>
|
||||
) : null}
|
||||
@@ -54,12 +59,12 @@ export const UsageProviderCards: React.FC<{
|
||||
);
|
||||
return (
|
||||
<div key={row.key} className="flex min-w-0 items-baseline justify-between gap-3">
|
||||
<span className="inline-flex min-w-0 flex-1 items-baseline gap-1.5">
|
||||
<span className="truncate typography-ui-label text-muted-foreground">
|
||||
<span className="flex min-w-0 flex-1 items-baseline gap-1.5">
|
||||
<span className="shrink-0 truncate typography-ui-label text-muted-foreground">
|
||||
{row.subtitle ? `${row.subtitle} · ${row.label}` : row.label}
|
||||
</span>
|
||||
{resetLabel ? (
|
||||
<span className="shrink-0 truncate typography-micro text-muted-foreground/70">
|
||||
<span className="min-w-0 truncate typography-micro text-muted-foreground/70">
|
||||
{resetLabel}
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
@@ -15,6 +15,7 @@ export type UsageLimitRow = {
|
||||
export type UsageProviderGroup = {
|
||||
providerId: QuotaProviderId;
|
||||
providerName: string;
|
||||
planLabel?: string | null;
|
||||
rows: UsageLimitRow[];
|
||||
/** Provider-level message: a fetch error, or "nothing reported". */
|
||||
status: string | null;
|
||||
@@ -76,6 +77,7 @@ export const useUsageProviderGroups = (): UsageProviderGroup[] => {
|
||||
return {
|
||||
providerId: providerMeta.id,
|
||||
providerName: providerMeta.name,
|
||||
planLabel: result.planLabel,
|
||||
rows,
|
||||
status,
|
||||
};
|
||||
|
||||
@@ -2853,9 +2853,9 @@ export const dict = {
|
||||
'quota.window.5h': '5-Stunden-Limit',
|
||||
'quota.window.7d': '7-Tage-Limit',
|
||||
'quota.window.extraUsage': 'Zusätzliche Nutzung',
|
||||
'quota.window.weekly': 'Wöchentliches Limit',
|
||||
'quota.window.weekly': 'Wöchentlich',
|
||||
'quota.window.daily': 'Täglich',
|
||||
'quota.window.monthly': 'Monatliches Limit',
|
||||
'quota.window.monthly': 'Monatlich',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Kreditguthaben',
|
||||
'quota.window.monthlyCredits': 'Monatliche Credits',
|
||||
|
||||
@@ -3031,9 +3031,9 @@ export const dict = {
|
||||
'quota.window.5h': '5-Hour',
|
||||
'quota.window.7d': '7-Day Limit',
|
||||
'quota.window.extraUsage': 'Extra Usage',
|
||||
'quota.window.weekly': 'Weekly Limit',
|
||||
'quota.window.weekly': 'Weekly',
|
||||
'quota.window.daily': 'Daily',
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.monthly': 'Monthly',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.monthlyCredits': 'Monthly Credits',
|
||||
|
||||
@@ -3032,9 +3032,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
"quota.window.5h": "5-Hour",
|
||||
"quota.window.7d": "7-Day Limit",
|
||||
"quota.window.extraUsage": "Uso adicional",
|
||||
"quota.window.weekly": "Weekly Limit",
|
||||
"quota.window.weekly": "Semanal",
|
||||
"quota.window.daily": "Daily",
|
||||
"quota.window.monthly": "Monthly Limit",
|
||||
"quota.window.monthly": "Mensual",
|
||||
"quota.window.credits": "Credits",
|
||||
"quota.window.creditsBalance": "Credits Balance",
|
||||
"quota.window.monthlyCredits": "Créditos mensuales",
|
||||
|
||||
@@ -2724,9 +2724,9 @@ export const dict = {
|
||||
'quota.window.5h': '5 heures',
|
||||
'quota.window.7d': 'Limite sur 7 jours',
|
||||
'quota.window.extraUsage': 'Utilisation supplémentaire',
|
||||
'quota.window.weekly': 'Limite hebdomadaire',
|
||||
'quota.window.weekly': 'Hebdomadaire',
|
||||
'quota.window.daily': 'Quotidien',
|
||||
'quota.window.monthly': 'Limite mensuelle',
|
||||
'quota.window.monthly': 'Mensuel',
|
||||
'quota.window.credits': 'Crédits',
|
||||
'quota.window.creditsBalance': 'Solde de crédits',
|
||||
'quota.window.monthlyCredits': 'Crédits mensuels',
|
||||
|
||||
@@ -3027,9 +3027,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.5h': '5時間',
|
||||
'quota.window.7d': '7日間制限',
|
||||
'quota.window.extraUsage': '追加利用',
|
||||
'quota.window.weekly': '週間制限',
|
||||
'quota.window.weekly': '毎週',
|
||||
'quota.window.daily': '日次',
|
||||
'quota.window.monthly': '月間制限',
|
||||
'quota.window.monthly': '毎月',
|
||||
'quota.window.credits': 'クレジット',
|
||||
'quota.window.creditsBalance': 'クレジット残高',
|
||||
'quota.window.monthlyCredits': '月間クレジット',
|
||||
|
||||
@@ -3031,9 +3031,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.5h': '5-Hour',
|
||||
'quota.window.7d': '7-Day Limit',
|
||||
'quota.window.extraUsage': '추가 사용량',
|
||||
'quota.window.weekly': 'Weekly Limit',
|
||||
'quota.window.weekly': '매주',
|
||||
'quota.window.daily': 'Daily',
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.monthly': '매월',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.monthlyCredits': '월간 크레딧',
|
||||
|
||||
@@ -3048,9 +3048,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.5h': '5-Hour',
|
||||
'quota.window.7d': '7-Day Limit',
|
||||
'quota.window.extraUsage': 'Dodatkowe zużycie',
|
||||
'quota.window.weekly': 'Weekly Limit',
|
||||
'quota.window.weekly': 'Tygodniowo',
|
||||
'quota.window.daily': 'Daily',
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.monthly': 'Miesięcznie',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.monthlyCredits': 'Kredyty miesięczne',
|
||||
|
||||
@@ -3032,9 +3032,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
"quota.window.5h": "5-Hour",
|
||||
"quota.window.7d": "7-Day Limit",
|
||||
"quota.window.extraUsage": "Uso adicional",
|
||||
"quota.window.weekly": "Weekly Limit",
|
||||
"quota.window.weekly": "Semanal",
|
||||
"quota.window.daily": "Daily",
|
||||
"quota.window.monthly": "Monthly Limit",
|
||||
"quota.window.monthly": "Mensal",
|
||||
"quota.window.credits": "Credits",
|
||||
"quota.window.creditsBalance": "Credits Balance",
|
||||
"quota.window.monthlyCredits": "Créditos mensais",
|
||||
|
||||
@@ -3032,9 +3032,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
"quota.window.5h": "5-Hour",
|
||||
"quota.window.7d": "7-Day Limit",
|
||||
"quota.window.extraUsage": "Додаткове використання",
|
||||
"quota.window.weekly": "Weekly Limit",
|
||||
"quota.window.weekly": "Щотижня",
|
||||
"quota.window.daily": "Daily",
|
||||
"quota.window.monthly": "Monthly Limit",
|
||||
"quota.window.monthly": "Щомісяця",
|
||||
"quota.window.credits": "Credits",
|
||||
"quota.window.creditsBalance": "Credits Balance",
|
||||
"quota.window.monthlyCredits": "Місячні кредити",
|
||||
|
||||
@@ -3032,9 +3032,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.5h': '5-Hour',
|
||||
'quota.window.7d': '7-Day Limit',
|
||||
'quota.window.extraUsage': '额外用量',
|
||||
'quota.window.weekly': 'Weekly Limit',
|
||||
'quota.window.weekly': '每周',
|
||||
'quota.window.daily': 'Daily',
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.monthly': '每月',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.monthlyCredits': '每月积分',
|
||||
|
||||
@@ -3031,9 +3031,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.5h': '5-Hour',
|
||||
'quota.window.7d': '7-Day Limit',
|
||||
'quota.window.extraUsage': '額外用量',
|
||||
'quota.window.weekly': 'Weekly Limit',
|
||||
'quota.window.weekly': '每週',
|
||||
'quota.window.daily': 'Daily',
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.monthly': '每月',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.monthlyCredits': '每月點數',
|
||||
|
||||
Reference in New Issue
Block a user