Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
refactor(desktop): 计费页收尾——支付方式单行且唯一渠道默认选中,底部点数换算说明
xd-bobo9550eeec5501
diff --git a/apps/desktop/src/renderer/features/billing/BillingPage.tsx b/apps/desktop/src/renderer/features/billing/BillingPage.tsxindex c70ae6b557..cc5168fa5a 100644--- a/apps/desktop/src/renderer/features/billing/BillingPage.tsx+++ b/apps/desktop/src/renderer/features/billing/BillingPage.tsx@@ -7,7 +7,6 @@ import {CreditCard,PackageOpen,RefreshCcw,- ShieldCheck,X,} from 'lucide-react';import { useTranslation } from 'react-i18next';@@ -498,7 +497,10 @@ export function BillingSettingsSection({ accountId }: { accountId: string | nullconst entry = offers.find(({ offer }) => offer.code === offerCode);if (!entry || !isCatalogOfferPurchasable(entry)) return;setSelectedOfferCode(offerCode);- setSelectedPurchaseOptionId(null);+ // 只有一种支付方式时默认选中,免去一次多余点击。+ setSelectedPurchaseOptionId(+ entry.purchaseOptions.length === 1 ? entry.purchaseOptions[0].id : null,+ );setCustomAmount('');};@@ -655,6 +657,14 @@ export function BillingSettingsSection({ accountId }: { accountId: string | null</BillingGroup>)}</div>++ <p className="mt-8 text-12 leading-5 text-[var(--text-tertiary)]">+ {t(+ BILLING_CURRENCY === 'usd'+ ? 'billing.balance.creditParityUsd'+ : 'billing.balance.creditParityCny',+ )}+ </p></div><BillingOfferDialog@@ -1449,11 +1459,7 @@ function BillingOfferDialog({)}</div>- <div className="flex min-h-16 items-center justify-between gap-4 border-t border-[var(--border-default)] px-6 py-3">- <div className="flex min-w-0 max-w-[380px] items-start gap-2 text-11 leading-4 text-[var(--text-tertiary)]">- <ShieldCheck size={13} className="shrink-0" />- <span>{t('billing.securityNotice')}</span>- </div>+ <div className="flex min-h-16 items-center justify-end gap-4 border-t border-[var(--border-default)] px-6 py-3"><buttontype="button"onClick={onSubmit}@@ -1537,11 +1543,11 @@ function PaymentOptionRow({) : (<Icon size={16} className="shrink-0 text-[var(--text-secondary)]" />)}- <div className="min-w-0 flex-1">+ <div className="flex min-w-0 flex-1 items-baseline gap-2"><p className="truncate text-13 font-medium text-[var(--text-primary)]">{providerLabel(option.provider, t)}</p>- <p className="mt-0.5 text-11 text-[var(--text-tertiary)]">+ <p className="truncate text-11 text-[var(--text-tertiary)]">{option.paymentAction === 'QR_CODE'? t('billing.paymentActions.QR_CODE'): t('billing.paymentActions.REDIRECT')}diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.jsonindex bc935a92f8..56f92d2b28 100644--- a/apps/desktop/src/renderer/i18n/locales/en/common.json+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json@@ -7119,6 +7119,8 @@},"balance": {"title": "Available balance",+ "creditParityCny": "1 credit = 1 CNY. Credits pay for Cindy AI usage; payments are processed by third-party providers.",+ "creditParityUsd": "1 credit = 1 USD. Credits pay for Cindy AI usage; payments are processed by third-party providers.","plan": "Plan credits","purchased": "Purchased credits","promotional": "Promotional credits",@@ -7208,7 +7210,6 @@"alipay": "Alipay","stripe": "Card"},- "securityNotice": "Payments are securely handled by the selected provider; Cindy does not store payment credentials","currentSubscription": {"title": "Current subscription","purchaseBlocked": "You already have an unfinished subscription. Manage it before purchasing another plan."diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex 0a571a62fd..0e8a73424b 100644--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@ -7108,6 +7108,8 @@},"balance": {"title": "利用可能残高",+ "creditParityCny": "1クレジット = 1元。クレジットは Cindy AI の利用量の決済に使われ、支払いは第三者の決済事業者が処理します。",+ "creditParityUsd": "1クレジット = 1米ドル。クレジットは Cindy AI の利用量の決済に使われ、支払いは第三者の決済事業者が処理します。","plan": "プランクレジット","purchased": "購入済みクレジット","promotional": "特典クレジット",@@ -7197,7 +7199,6 @@"alipay": "Alipay","stripe": "カード"},- "securityNotice": "支払いは選択した事業者が安全に処理し、Cindyは支払い認証情報を保存しません","currentSubscription": {"title": "現在のサブスクリプション","purchaseBlocked": "未終了のサブスクリプションがあります。既存のサブスクリプションを処理してから新しいプランを購入してください。"diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex bd69b703a1..1b70fdebf1 100644--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@ -7108,6 +7108,8 @@},"balance": {"title": "사용 가능 잔액",+ "creditParityCny": "1크레딧 = 1위안. 크레딧은 Cindy AI 사용량 결제에 사용되며, 결제는 제3자 결제 채널에서 처리됩니다.",+ "creditParityUsd": "1크레딧 = 1달러. 크레딧은 Cindy AI 사용량 결제에 사용되며, 결제는 제3자 결제 채널에서 처리됩니다.","plan": "요금제 크레딧","purchased": "구매한 크레딧","promotional": "프로모션 크레딧",@@ -7197,7 +7199,6 @@"alipay": "Alipay","stripe": "카드"},- "securityNotice": "결제는 선택한 결제사에서 안전하게 처리하며 Cindy는 결제 인증 정보를 저장하지 않습니다","currentSubscription": {"title": "현재 구독","purchaseBlocked": "종료되지 않은 구독이 있습니다. 기존 구독을 처리한 후 새 요금제를 구매하세요."diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.jsonindex 93ddeb2bbb..6df1bf12cd 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json@@ -7108,6 +7108,8 @@},"balance": {"title": "可用额度",+ "creditParityCny": "1 点 = 1 元,用于 Cindy AI 用量结算;支付由第三方渠道处理。",+ "creditParityUsd": "1 点 = 1 美元,用于 Cindy AI 用量结算;支付由第三方渠道处理。","plan": "订阅额度","purchased": "已购额度","promotional": "赠送额度",@@ -7197,7 +7199,6 @@"alipay": "支付宝","stripe": "银行卡"},- "securityNotice": "支付由所选渠道安全处理,Cindy 不保存你的支付凭证","currentSubscription": {"title": "当前订阅","purchaseBlocked": "当前已有未结束的订阅,请先处理现有订阅后再购买新套餐。"