Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(billing): review 修复——选中行改用 chip 填充,用量明细改单条 i18n 模板

xd-bobo88c68c261fe5
diff --git a/apps/desktop/src/renderer/features/billing/BillingPage.tsx b/apps/desktop/src/renderer/features/billing/BillingPage.tsx
index cc5168fa5a..4a1b6af92c 100644
--- a/apps/desktop/src/renderer/features/billing/BillingPage.tsx
+++ b/apps/desktop/src/renderer/features/billing/BillingPage.tsx
@@ -1120,7 +1120,10 @@ function CreditPoolRow({ label, pool }: { label: string; pool: ModelAccessCredit
const percent = usagePercent(pool);
const detail =
pool.used !== null && pool.total !== null
- ? `${t('billing.usage.used')} ${formatMoney(pool.used, BILLING_CURRENCY, billingLocale)} · ${t('billing.usage.total')} ${formatMoney(pool.total, BILLING_CURRENCY, billingLocale)}`
+ ? t('billing.usage.poolDetail', {
+ used: formatMoney(pool.used, BILLING_CURRENCY, billingLocale),
+ total: formatMoney(pool.total, BILLING_CURRENCY, billingLocale),
+ })
: t('billing.usage.historyUnavailable');
return (
<div className="flex flex-wrap items-center justify-between gap-x-6 gap-y-2 px-5 py-3.5">
@@ -1350,7 +1353,9 @@ function BillingOfferDialog({
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset',
'focus-visible:ring-[var(--text-primary)]',
'disabled:cursor-not-allowed disabled:opacity-55 disabled:hover:bg-transparent',
- active ? 'bg-[var(--surface)]' : 'hover:bg-[var(--surface-hover-soft)]',
+ active
+ ? 'bg-[var(--surface-chip)]'
+ : 'hover:bg-[var(--surface-hover-soft)]',
)}
>
<div className="min-w-0 flex-1">
@@ -1535,7 +1540,7 @@ function PaymentOptionRow({
'flex w-full items-center gap-3 px-4 py-3 text-left transition-colors',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset',
'focus-visible:ring-[var(--text-primary)]',
- active ? 'bg-[var(--surface)]' : 'hover:bg-[var(--surface-hover-soft)]',
+ active ? 'bg-[var(--surface-chip)]' : 'hover:bg-[var(--surface-hover-soft)]',
)}
>
{option.provider === 'alipay' ? (
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index 56f92d2b28..8bc6238133 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -7131,8 +7131,7 @@
"usage": {
"title": "Credit usage",
"observedAt": "Balance updated {{date}}",
- "used": "Used",
- "total": "Total",
+ "poolDetail": "Used {{used}} · Total {{total}}",
"remaining": "Remaining",
"progressLabel": "{{label}} usage",
"historyUnavailable": "Usage history is incomplete. Only the remaining balance is available.",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 0e8a73424b..5eceb28f17 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -7120,8 +7120,7 @@
"usage": {
"title": "クレジット使用状況",
"observedAt": "クレジット更新: {{date}}",
- "used": "使用済み",
- "total": "合計",
+ "poolDetail": "使用済み {{used}} · 合計 {{total}}",
"remaining": "残り",
"progressLabel": "{{label}}の使用状況",
"historyUnavailable": "使用履歴が完全ではないため、残りのクレジットのみ表示しています。",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 1b70fdebf1..468a913bc0 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -7120,8 +7120,7 @@
"usage": {
"title": "크레딧 사용량",
"observedAt": "크레딧 업데이트: {{date}}",
- "used": "사용",
- "total": "전체",
+ "poolDetail": "사용 {{used}} · 전체 {{total}}",
"remaining": "잔여",
"progressLabel": "{{label}} 사용량",
"historyUnavailable": "사용 기록이 완전하지 않아 잔여 크레딧만 표시합니다.",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index 6df1bf12cd..ac30aa50db 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -7120,8 +7120,7 @@
"usage": {
"title": "额度使用",
"observedAt": "额度更新于 {{date}}",
- "used": "已用",
- "total": "总额",
+ "poolDetail": "已用 {{used}} · 总额 {{total}}",
"remaining": "剩余",
"progressLabel": "{{label}}使用进度",
"historyUnavailable": "历史记录不完整,暂时仅显示剩余额度。",