From f66127da44d1cc0d80f9b738704b390bfdaaee78 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Sun, 7 Jun 2026 01:08:13 +0800 Subject: [PATCH] Refine pricing display and Gaussian context --- frontend/components/account/AccountCenter.tsx | 32 +++++------ .../__tests__/paymentReferralPricing.test.ts | 26 ++++++--- frontend/components/account/account-copy.ts | 1 - .../scan-terminal/TemperatureChartCanvas.tsx | 2 +- .../TemperatureTooltipContent.tsx | 29 ++++++++-- ...temperatureDefaultVisibilityPolicy.test.ts | 10 ++-- .../temperatureTooltipContent.test.ts | 24 ++++++++- .../scan-terminal/temperature-chart-logic.ts | 6 +-- .../landing/InstitutionalLandingPage.tsx | 4 +- .../subscription/UnlockProOverlay.tsx | 54 ++++++++++++------- 10 files changed, 128 insertions(+), 60 deletions(-) diff --git a/frontend/components/account/AccountCenter.tsx b/frontend/components/account/AccountCenter.tsx index 705f6ef3..dae95610 100644 --- a/frontend/components/account/AccountCenter.tsx +++ b/frontend/components/account/AccountCenter.tsx @@ -63,10 +63,6 @@ import { import { createAccountCopy } from "./account-copy"; import { resetWalletConnectProvider } from "./wallet"; import { useAccountPayment } from "./useAccountPayment"; -import { - isTelegramPrivateGroupPriceEligible, - telegramPrivateGroupAmountUsdc, -} from "./telegram-pricing"; // --- Main Component --- @@ -437,12 +433,14 @@ export function AccountCenter() { { plan_code: "pro_monthly", plan_id: 101, amount_usdc: "29.9", duration_days: 30 }, { plan_code: "pro_quarterly", plan_id: 102, amount_usdc: "79.9", duration_days: 90 }, ]; - const privateTelegramGroupPriceActive = isTelegramPrivateGroupPriceEligible( - backend?.telegram_pricing, - ); - const privateTelegramGroupAmount = telegramPrivateGroupAmountUsdc( - backend?.telegram_pricing, - ); + const selectedPlanDurationDays = Number(selectedPlan?.duration_days || 30); + const overlayPlanLabel = + selectedPlanCode === "pro_quarterly" + ? copy.quarterlyPlan + : copy.monthlyPlan; + const overlayPeriodLabel = isEn + ? `/ ${selectedPlanDurationDays} days` + : `/ ${selectedPlanDurationDays} 天`; const referral = backend?.referral; const referralCode = String(referral?.code || "").trim(); const appliedReferralCode = String(referral?.applied_code || "").trim(); @@ -915,6 +913,8 @@ export function AccountCenter() { setUsePoints((prev) => !prev)} billing={{ @@ -932,6 +932,7 @@ export function AccountCenter() { payBusy={paymentBusy} payLabel={hasPayingWallet ? copy.payNow : copy.connectAndPay} manualPayLabel="手动转账" + locale={locale} errorText={paymentError || undefined} infoText={paymentInfo || undefined} txHash={lastTxHash || undefined} @@ -1112,13 +1113,6 @@ export function AccountCenter() { const code = String(plan.plan_code || ""); const active = code === selectedPlanCode; const isQuarterly = code === "pro_quarterly"; - const isPrivateGroupMonthly = Boolean( - code === "pro_monthly" && - privateTelegramGroupPriceActive && - privateTelegramGroupAmount && - Number(plan.amount_usdc) === - Number(privateTelegramGroupAmount), - ); return (