diff --git a/frontend/components/subscription/UnlockProOverlay.tsx b/frontend/components/subscription/UnlockProOverlay.tsx index 62d4ae3a..45c3d8cf 100644 --- a/frontend/components/subscription/UnlockProOverlay.tsx +++ b/frontend/components/subscription/UnlockProOverlay.tsx @@ -10,9 +10,13 @@ import { Loader2, Lock, MessageSquare, + Radar, + Send, + Sparkles, TrendingUp, Wallet, X, + Zap, } from "lucide-react"; export type UnlockProBilling = { @@ -42,6 +46,19 @@ type UnlockProOverlayProps = { telegramGroupUrl?: string; }; +const features = { + "zh-CN": [ + { icon: TrendingUp, label: "15天高精度趋势预报" }, + { icon: Radar, label: "实时多源雷达图" }, + { icon: Send, label: "全平台智能气象推送" }, + ], + "en-US": [ + { icon: TrendingUp, label: "15-day precision forecast" }, + { icon: Radar, label: "Real-time radar panel" }, + { icon: Send, label: "Cross-platform alert push" }, + ], +}; + export function UnlockProOverlay({ points, planPriceUsd, @@ -62,227 +79,354 @@ export function UnlockProOverlay({ const title = isEn ? "Unlock PolyWeather Pro" : "解锁 PolyWeather Pro"; const subtitle = isEn - ? "Get high-precision weather intelligence and full-platform alerts." - : "获取全球最精准的高精度气象推送"; + ? "High-precision weather intelligence, delivered everywhere." + : "全球最精准的高精度气象推送,全平台覆盖"; const finalPayLabel = payLabel || (isEn ? "Subscribe & Activate" : "立即订阅并激活服务"); + const featureList = features[locale] ?? features["zh-CN"]; + + const canUsePoints = billing.pointsEnabled && billing.isEligible; + return ( -
+
{subtitle}
+ {usePoints + ? isEn + ? `Using ${billing.pointsUsed} pts · saves $${billing.discountAmount.toFixed(2)}` + : `已消耗 ${billing.pointsUsed} 积分 · 省 $${billing.discountAmount.toFixed(2)}` + : isEn + ? `Toggle to save up to $${billing.maxDiscountUsd.toFixed(2)}` + : `开启可最多抵扣 $${billing.maxDiscountUsd.toFixed(2)}`} +
+ + {/* Points balance */} +- {usePoints - ? isEn - ? `Using ${billing.pointsUsed} points from your account` - : `已自动消耗账户内 ${billing.pointsUsed} 积分` - : isEn - ? `Enable to save up to $${billing.maxDiscountUsd.toFixed(2)}` - : `开启后最多可抵扣 $${billing.maxDiscountUsd.toFixed(2)}`} -
{!billing.pointsEnabled ? isEn - ? "Points Disabled" - : "积分未开启" + ? "Points redemption is unavailable for this plan." + : "当前套餐暂不支持积分抵扣。" : isEn - ? "Not Enough Points" - : "积分不足"} -
+ ? `Need ${billing.pointsPerUsd} pts minimum. You have: ${points}` + : `至少需要 ${billing.pointsPerUsd} 积分,当前仅有 ${points}`} +- {!billing.pointsEnabled - ? isEn - ? "Points redemption is currently unavailable for this plan." - : "当前套餐未开启积分抵扣。" - : isEn - ? `Need at least ${billing.pointsPerUsd} points. Current: ${points}` - : `需要至少 ${billing.pointsPerUsd} 积分,当前 ${points}`} -
-+ {isEn ? "Total Due Today" : "今日应付"} +
+ {billing.discountAmount > 0 && usePoints && ( ++ ${planPriceUsd.toFixed(2)} USD +
+ )} +{errorText}
+{infoText}
+