Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
fix(web): web1218 Some issues (#413)
布莱恩·奥夫托·杰森张b9aedd65b62f
diff --git a/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx b/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsxindex 37107b91..3ac149c8 100644--- a/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx+++ b/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx@@ -41,11 +41,11 @@ const PLANS: Array<{id: 'creator',highlight: true, // 创作者方案设为推荐},- {- id: 'enterprise',- highlight: false,- isCustom: true, // 定制价格- },+ // {+ // id: 'enterprise',+ // highlight: false,+ // isCustom: true, // 定制价格+ // },]export const PricingContent = memo(({ lng }: PricingContentProps) => {diff --git a/project/web/src/app/i18n/locales/en/chat.json b/project/web/src/app/i18n/locales/en/chat.jsonindex bce2b37b..deadc003 100644--- a/project/web/src/app/i18n/locales/en/chat.json+++ b/project/web/src/app/i18n/locales/en/chat.json@@ -1,6 +1,6 @@{"input": {- "placeholder": "Describe what you want to create...",+ "placeholder": "Help me create a cat dancing video and post it directly on YouTube","send": "Send","stop": "Stop","uploading": "Uploading..."@@ -27,7 +27,7 @@},"home": {"title": "How can I help you?",- "subtitle": "Describe what you want to create, AI will help you generate",+ "subtitle": "What content do you want to create today and on which platform?","recentTasks": "Recent Tasks","viewAll": "View All","noTasks": "No task records",diff --git a/project/web/src/app/i18n/locales/en/common.json b/project/web/src/app/i18n/locales/en/common.jsonindex a00040a4..ae1a43a9 100644--- a/project/web/src/app/i18n/locales/en/common.json+++ b/project/web/src/app/i18n/locales/en/common.json@@ -7,12 +7,12 @@"support": "Support","notifications": "Notifications","settings": "Settings",- "vip": "VIP",- "subscribe": "Subscribe",- "balance": "Balance",- "plugin": "Browser Plugin",+ "vip": "Plus",+ "subscribe": "Upgrade",+ "balance": "Credits",+ "plugin": "Extension","pluginStatus": {- "notInstalled": "Not Installed",+ "notInstalled": "Install","noPermission": "Not Authorized","ready": "Ready","checking": "Checking"diff --git a/project/web/src/app/i18n/locales/en/home.json b/project/web/src/app/i18n/locales/en/home.jsonindex 09489508..be3ee521 100644--- a/project/web/src/app/i18n/locales/en/home.json+++ b/project/web/src/app/i18n/locales/en/home.json@@ -30,7 +30,7 @@},"agentGenerator": {"title": "How can I help you?",- "subtitle": "Describe what you want to create, AI will help you generate"+ "subtitle": "What content do you want to create today and on which platform?"},"aiGeneration": {"inputPlaceholder": "Enter your content idea, AI will generate a complete work for you...",diff --git a/project/web/src/app/i18n/locales/en/income.json b/project/web/src/app/i18n/locales/en/income.jsonindex 6f8b0b01..ad00fe38 100644--- a/project/web/src/app/i18n/locales/en/income.json+++ b/project/web/src/app/i18n/locales/en/income.json@@ -1,7 +1,7 @@{"title": "My Income","subtitle": "Manage your income records and withdrawal applications",- "currentBalance": "Current Balance",+ "currentBalance": "Current Credits","incomeRecords": "Income Records","withdrawRecords": "Withdrawal Records","incomeId": "Income ID",diff --git a/project/web/src/app/i18n/locales/en/interactiveNew.json b/project/web/src/app/i18n/locales/en/interactiveNew.jsonindex 3046c481..90f1aedf 100644--- a/project/web/src/app/i18n/locales/en/interactiveNew.json+++ b/project/web/src/app/i18n/locales/en/interactiveNew.json@@ -18,7 +18,7 @@"video": "Video","noTitle": "Untitled","pluginNotReady": "Plugin not ready",- "pluginNotReadyDesc": "Please install and authorize the AIToEarn browser extension first",+ "pluginNotReadyDesc": "Please install and authorize the Aitoearn browser extension first","installPlugin": "Install Plugin","followed": "Followed","liked": "Liked",diff --git a/project/web/src/app/i18n/locales/en/plugin.json b/project/web/src/app/i18n/locales/en/plugin.jsonindex c4dcc338..84ae2e8e 100644--- a/project/web/src/app/i18n/locales/en/plugin.json+++ b/project/web/src/app/i18n/locales/en/plugin.json@@ -15,7 +15,7 @@"error": "Error"},"error": {- "pluginNotInstalled": "Please install AIToEarn browser plugin first",+ "pluginNotInstalled": "Please install Aitoearn browser plugin first","publishingInProgress": "Publishing in progress, please try again later","loginFailed": "Login failed","publishFailed": "Publish failed"@@ -67,7 +67,7 @@"pluginActive": "Plugin Active","pluginInactive": "Plugin Inactive","downloadPlugin": "Download Plugin",- "downloadDescription": "AIToEarn browser plugin helps you quickly publish content to various platforms. Click the button below to download and install.",+ "downloadDescription": "Aitoearn browser plugin helps you quickly publish content to various platforms. Click the button below to download and install.","downloadButton": "Download Now","chromeWebStore": "Chrome Web Store","githubRelease": "GitHub Release",diff --git a/project/web/src/app/i18n/locales/en/profile.json b/project/web/src/app/i18n/locales/en/profile.jsonindex 352e1160..4342c7a5 100644--- a/project/web/src/app/i18n/locales/en/profile.json+++ b/project/web/src/app/i18n/locales/en/profile.json@@ -101,7 +101,7 @@"myPoints": "My Points","pointsDescription": "View your points change history and usage","pointsChange": "Points Change",- "balance": "Balance",+ "balance": "Credits","changeType": "Change Type","description": "Description","time": "Time",@@ -174,7 +174,7 @@"confirmCancel": "Confirm Cancellation","stats": {"totalEarned": "Total Earned",- "balance": "Balance",+ "balance": "Credits","points": "Points","coupons": "Coupons","currencyYuan": "CNY"diff --git a/project/web/src/app/i18n/locales/en/settings.json b/project/web/src/app/i18n/locales/en/settings.jsonindex 30539427..7ab78fba 100644--- a/project/web/src/app/i18n/locales/en/settings.json+++ b/project/web/src/app/i18n/locales/en/settings.json@@ -8,8 +8,8 @@"general": "General"},"profile": {- "totalIncome": "Total Income",- "currentBalance": "Current Balance",+ "totalIncome": "Balance",+ "currentBalance": "Current Credits","logout": "Logout","edit": "Edit","save": "Save",@@ -37,7 +37,7 @@"currentPlan": "Current Plan","upgrade": "Upgrade","manage": "Manage Subscription",- "balance": "Balance",+ "balance": "Credits","usageRecords": "Usage Records","detail": "Detail","date": "Date",@@ -54,7 +54,8 @@"publish": "Publish","expired": "Expired","manual": "Manual Adjustment"- }+ },+ "viewAgentPricing": "View the specific prices of each model of the agent"},"general": {"language": "Website Language",diff --git a/project/web/src/app/i18n/locales/en/vip.json b/project/web/src/app/i18n/locales/en/vip.jsonindex 4d715e4b..e8b70034 100644--- a/project/web/src/app/i18n/locales/en/vip.json+++ b/project/web/src/app/i18n/locales/en/vip.json@@ -24,14 +24,11 @@}},"creator": {- "name": "Monthly PLUS Member",+ "name": "LUS Member","price": "19",- "button": "Upgrade to Monthly PLUS Member",+ "button": "Upgrade to PLUS Member","features": {- "0": "$50 Agent Credits per Month",- "1": "Sora-2: Free & Unlimited",- "2": "Nano Banana Pro: Free & Unlimited",- "3": "Everything in Free"+ "0": "$50 Agent Credits per Month"}},"enterprise": {@@ -134,7 +131,7 @@"details": "Details","subscription": "Subscription","planType": "Plan Type",- "monthly": "Monthly PLUS",+ "monthly": "PLUS","monthly2": "Monthly","yearly2": "Yearly","yearly": "Yearly PLUS",diff --git a/project/web/src/app/i18n/locales/zh-CN/common.json b/project/web/src/app/i18n/locales/zh-CN/common.jsonindex 4dadb16b..908bb142 100644--- a/project/web/src/app/i18n/locales/zh-CN/common.json+++ b/project/web/src/app/i18n/locales/zh-CN/common.json@@ -9,7 +9,7 @@"settings": "设置","vip": "会员","subscribe": "开通订阅",- "balance": "余额",+ "balance": "额度","plugin": "浏览器插件","pluginStatus": {"notInstalled": "未安装",diff --git a/project/web/src/app/i18n/locales/zh-CN/interactiveNew.json b/project/web/src/app/i18n/locales/zh-CN/interactiveNew.jsonindex 5a0fa1bc..0054e29b 100644--- a/project/web/src/app/i18n/locales/zh-CN/interactiveNew.json+++ b/project/web/src/app/i18n/locales/zh-CN/interactiveNew.json@@ -18,7 +18,7 @@"video": "视频","noTitle": "无标题","pluginNotReady": "插件未就绪",- "pluginNotReadyDesc": "请先安装并授权 AIToEarn 浏览器插件",+ "pluginNotReadyDesc": "请先安装并授权 Aitoearn 浏览器插件","installPlugin": "安装插件","followed": "已关注","liked": "已赞",diff --git a/project/web/src/app/i18n/locales/zh-CN/plugin.json b/project/web/src/app/i18n/locales/zh-CN/plugin.jsonindex b2f62bf3..a3b9669b 100644--- a/project/web/src/app/i18n/locales/zh-CN/plugin.json+++ b/project/web/src/app/i18n/locales/zh-CN/plugin.json@@ -15,7 +15,7 @@"error": "错误"},"error": {- "pluginNotInstalled": "请先安装 AIToEarn 浏览器插件",+ "pluginNotInstalled": "请先安装 Aitoearn 浏览器插件","publishingInProgress": "当前正在发布中,请稍后再试","loginFailed": "登录失败","publishFailed": "发布失败"@@ -67,7 +67,7 @@"pluginActive": "插件已激活","pluginInactive": "插件未激活","downloadPlugin": "下载插件",- "downloadDescription": "AIToEarn 浏览器插件可以帮助您快速发布内容到各大平台。请点击下方按钮下载安装。",+ "downloadDescription": "Aitoearn 浏览器插件可以帮助您快速发布内容到各大平台。请点击下方按钮下载安装。","downloadButton": "立即下载","chromeWebStore": "Chrome 应用商店","githubRelease": "GitHub 下载",diff --git a/project/web/src/app/i18n/locales/zh-CN/settings.json b/project/web/src/app/i18n/locales/zh-CN/settings.jsonindex 565e7e25..8f622c01 100644--- a/project/web/src/app/i18n/locales/zh-CN/settings.json+++ b/project/web/src/app/i18n/locales/zh-CN/settings.json@@ -54,7 +54,8 @@"publish": "发布内容","expired": "已过期","manual": "手动调整"- }+ },+ "viewAgentPricing": "查看 Agent 各模型的具体价格"},"general": {"language": "网站语言",diff --git a/project/web/src/app/i18n/locales/zh-CN/vip.json b/project/web/src/app/i18n/locales/zh-CN/vip.jsonindex 69e14f3b..ad580edf 100644--- a/project/web/src/app/i18n/locales/zh-CN/vip.json+++ b/project/web/src/app/i18n/locales/zh-CN/vip.json@@ -28,10 +28,7 @@"price": "19","button": "升级至月度PLUS会员","features": {- "0": "每月 50$ Agent 额度",- "1": "Sora-2:免费且无限",- "2": "Nano Banana Pro:免费且无限",- "3": "免费计划的所有功能"+ "0": "每月 50$ Agent 额度"}},"enterprise": {diff --git a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsx b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsxindex 5ec40a41..5347a07e 100644--- a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsx@@ -10,7 +10,6 @@ import type { BottomSectionProps } from '../../types'import { BalanceEntry } from './BalanceEntry'import { PluginEntry } from './PluginEntry'import { VipEntry } from './VipEntry'-import { SettingsEntry } from './SettingsEntry'export function BottomSection({ collapsed, onOpenSettings }: BottomSectionProps) {return (@@ -31,12 +30,6 @@ export function BottomSection({ collapsed, onOpenSettings }: BottomSectionProps){/* VIP 会员入口 */}<VipEntry collapsed={collapsed} />-- {/* 设置入口 */}- <SettingsEntry- collapsed={collapsed}- onClick={() => onOpenSettings()}- /></div>)}@@ -45,5 +38,4 @@ export function BottomSection({ collapsed, onOpenSettings }: BottomSectionProps)export { BalanceEntry } from './BalanceEntry'export { PluginEntry } from './PluginEntry'export { VipEntry } from './VipEntry'-export { SettingsEntry } from './SettingsEntry'diff --git a/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx b/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsxindex 46915a83..3e6d28c8 100644--- a/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx@@ -5,7 +5,7 @@'use client'import { useState } from 'react'-import { Bell, Mail, Smartphone } from 'lucide-react'+import { Bell, Mail, Settings, Smartphone } from 'lucide-react'import { useTransClient } from '@/app/i18n/client'import { Badge } from '@/components/ui/badge'import {@@ -18,7 +18,7 @@ import { cn } from '@/lib/utils'import DownloadAppModal from '@/components/common/DownloadAppModal'import type { IconBarProps } from '../types'-export function IconBar({ collapsed, isLoggedIn, unreadCount, onOpenNotification }: IconBarProps) {+export function IconBar({ collapsed, isLoggedIn, unreadCount, onOpenNotification, onOpenSettings }: IconBarProps) {const { t } = useTransClient('common')const [downloadModalVisible, setDownloadModalVisible] = useState(false)@@ -29,6 +29,26 @@ export function IconBar({ collapsed, isLoggedIn, unreadCount, onOpenNotificationcollapsed ? 'flex-col gap-1' : 'flex-row gap-0',)}>+ {/* 设置 - 第一个位置 */}+ {/* <TooltipProvider delayDuration={0}>+ <Tooltip>+ <TooltipTrigger asChild>+ <button+ className="flex h-9 w-9 cursor-pointer items-center justify-center rounded-lg border-none bg-transparent text-muted-foreground/70 transition-colors hover:bg-accent hover:text-muted-foreground"+ onClick={() => onOpenSettings()}+ >+ <Settings size={18} />+ </button>+ </TooltipTrigger>+ <TooltipContent+ side={collapsed ? 'right' : 'top'}+ className="bg-popover text-popover-foreground"+ >+ <p>{t('settings')}</p>+ </TooltipContent>+ </Tooltip>+ </TooltipProvider> */}+{/* 邮箱 - 联系我们 */}<TooltipProvider delayDuration={0}><Tooltip>diff --git a/project/web/src/app/layout/LayoutSidebar/components/LogoSection.tsx b/project/web/src/app/layout/LayoutSidebar/components/LogoSection.tsxindex cc0efb12..4ed3bb19 100644--- a/project/web/src/app/layout/LayoutSidebar/components/LogoSection.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/LogoSection.tsx@@ -30,7 +30,7 @@ export function LogoSection({ collapsed, onToggle }: LogoSectionProps) {href={`/${lng}`}className="flex items-center justify-center transition-opacity group-hover:opacity-0">- <Image src={logo} alt="AIToEarn" width={32} height={32} />+ <Image src={logo} alt="Aitoearn" width={32} height={32} /></Link>{/* 展开按钮 - 默认隐藏,hover 时显示 */}<button@@ -46,8 +46,8 @@ export function LogoSection({ collapsed, onToggle }: LogoSectionProps) {href={`/${lng}`}className="flex items-center gap-2 text-foreground no-underline hover:opacity-85">- <Image src={logo} alt="AIToEarn" width={32} height={32} />- <span className="text-base font-semibold tracking-tight">AIToEarn</span>+ <Image src={logo} alt="Aitoearn" width={32} height={32} />+ <span className="text-base font-semibold tracking-tight">Aitoearn</span></Link><buttononClick={onToggle}diff --git a/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsx b/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsxindex 0ca52da5..984ddc9b 100644--- a/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsx@@ -19,7 +19,7 @@ import { getOssUrl } from '@/utils/oss'import type { UserSectionProps } from '../types'/** 用户头像组件 */-function UserAvatar({ collapsed }: { collapsed: boolean }) {+function UserAvatar({ collapsed, onOpenSettings }: { collapsed: boolean; onOpenSettings: () => void }) {const userInfo = useUserStore(state => state.userInfo)const { t } = useTransClient('common')@@ -31,9 +31,10 @@ function UserAvatar({ collapsed }: { collapsed: boolean }) {<TooltipProvider><Tooltip><TooltipTrigger asChild>- <div+ <button+ onClick={onOpenSettings}className={cn(- 'flex items-center rounded-lg',+ 'flex w-full cursor-pointer items-center rounded-lg border-none bg-transparent transition-colors hover:bg-accent',collapsed ? 'justify-center p-1' : 'gap-2 px-2 py-1.5',)}>@@ -51,7 +52,7 @@ function UserAvatar({ collapsed }: { collapsed: boolean }) {{userInfo.name || t('unknownUser')}</span>)}- </div>+ </button></TooltipTrigger>{collapsed && (<TooltipContent side="right">@@ -63,12 +64,12 @@ function UserAvatar({ collapsed }: { collapsed: boolean }) {)}-export function UserSection({ collapsed, onLogin }: UserSectionProps) {+export function UserSection({ collapsed, onLogin, onOpenSettings }: UserSectionProps) {const token = useUserStore(state => state.token)const { t } = useTransClient('common')if (token) {- return <UserAvatar collapsed={collapsed} />+ return <UserAvatar collapsed={collapsed} onOpenSettings={() => onOpenSettings()} />}// 未登录状态diff --git a/project/web/src/app/layout/LayoutSidebar/index.tsx b/project/web/src/app/layout/LayoutSidebar/index.tsxindex a330f3b0..898be642 100644--- a/project/web/src/app/layout/LayoutSidebar/index.tsx+++ b/project/web/src/app/layout/LayoutSidebar/index.tsx@@ -112,12 +112,14 @@ const LayoutSidebar = () => {isLoggedIn={!!token}unreadCount={unreadCount}onOpenNotification={() => setNotificationVisible(true)}+ onOpenSettings={handleOpenSettings}/>{/* 用户头像 / 登录按钮 */}<UserSectioncollapsed={collapsed}onLogin={handleLogin}+ onOpenSettings={handleOpenSettings}/></aside>diff --git a/project/web/src/app/layout/LayoutSidebar/types.ts b/project/web/src/app/layout/LayoutSidebar/types.tsindex 2346e861..b55cc1ba 100644--- a/project/web/src/app/layout/LayoutSidebar/types.ts+++ b/project/web/src/app/layout/LayoutSidebar/types.ts@@ -23,6 +23,8 @@ export interface BottomSectionProps extends SidebarCommonProps, BottomSectionCalexport interface UserSectionProps extends SidebarCommonProps {/** 登录回调 */onLogin: () => void+ /** 打开设置弹框 */+ onOpenSettings: (defaultTab?: SettingsTab) => void}/** Logo 区域 Props */@@ -54,5 +56,7 @@ export interface IconBarProps extends SidebarCommonProps {unreadCount: number/** 打开通知面板 */onOpenNotification: () => void+ /** 打开设置弹框 */+ onOpenSettings: (defaultTab?: SettingsTab) => void}diff --git a/project/web/src/app/layout/MobileNav/index.tsx b/project/web/src/app/layout/MobileNav/index.tsxindex 6dfe2e1b..50baec17 100644--- a/project/web/src/app/layout/MobileNav/index.tsx+++ b/project/web/src/app/layout/MobileNav/index.tsx@@ -88,8 +88,8 @@ const MobileNav = () => {{/* 移动端顶部栏 */}<div className="md:hidden fixed top-0 left-0 right-0 z-50 flex items-center justify-between h-14 px-4 bg-background border-b border-border"><Link href={`/${lng}`} className="flex items-center gap-2">- <Image src={logo} alt="AIToEarn" width={32} height={32} />- <span className="text-base font-semibold text-foreground">AIToEarn</span>+ <Image src={logo} alt="Aitoearn" width={32} height={32} />+ <span className="text-base font-semibold text-foreground">Aitoearn</span></Link><buttononClick={() => setIsOpen(true)}diff --git a/project/web/src/components/SettingsModal/index.tsx b/project/web/src/components/SettingsModal/index.tsxindex c004a589..27a9e816 100644--- a/project/web/src/components/SettingsModal/index.tsx+++ b/project/web/src/components/SettingsModal/index.tsx@@ -22,7 +22,7 @@ import { AgentTab, GeneralTab, MembershipTab, ProfileTab, SubscriptionTab } fromimport logo from '@/assets/images/logo.png'/** 设置页面类型 */-type SettingsTab = 'profile' | 'agent' | 'subscription' | 'membership' | 'general'+type SettingsTab = 'profile' | 'subscription' | 'membership' | 'general'/** Tab 配置项类型 */interface TabConfig {@@ -73,7 +73,6 @@ export const SettingsModal = ({ open, onClose, defaultTab }: SettingsModalProps)// Tab 配置列表(易于扩展)const tabConfigs: TabConfig[] = [{ key: 'profile', icon: <User className="h-4 w-4" />, label: t('tabs.profile'), requireAuth: true },- { key: 'agent', icon: <Bot className="h-4 w-4" />, label: t('tabs.agent'), requireAuth: true },{ key: 'subscription', icon: <CreditCard className="h-4 w-4" />, label: t('tabs.subscription'), requireAuth: true },// 会员 Tab:只有用户曾经有过 vipInfo 才显示...(userInfo?.vipInfo@@ -95,8 +94,6 @@ export const SettingsModal = ({ open, onClose, defaultTab }: SettingsModalProps)switch (activeTab) {case 'profile':return isLoggedIn ? <ProfileTab onClose={onClose} /> : <GeneralTab />- case 'agent':- return isLoggedIn ? <AgentTab /> : <GeneralTab />case 'subscription':return isLoggedIn ? <SubscriptionTab /> : <GeneralTab />case 'membership':diff --git a/project/web/src/components/SettingsModal/tabs/MembershipTab.tsx b/project/web/src/components/SettingsModal/tabs/MembershipTab.tsxindex d3e5e847..50aa7a75 100644--- a/project/web/src/components/SettingsModal/tabs/MembershipTab.tsx+++ b/project/web/src/components/SettingsModal/tabs/MembershipTab.tsx@@ -346,7 +346,7 @@ export const MembershipTab = () => {<div className="flex items-center justify-between"><div className="font-medium">{subscription.plan === SubscriptionPlan.MONTH- ? tVip('modal.vipInfo.monthly2' as any)+ ? 'Plus': subscription.plan === SubscriptionPlan.CLOUD_SPACE_MONTH? '云空间月度': tVip('basicMembership' as any)}@@ -355,9 +355,7 @@ export const MembershipTab = () => {variant={subscription.status === SubscriptionStatus.ACTIVE? 'default'- : subscription.status === SubscriptionStatus.CANCELED- ? 'destructive'- : 'secondary'+ : 'secondary'}>{subscription.status === SubscriptionStatus.ACTIVE@@ -416,26 +414,31 @@ export const MembershipTab = () => {</div><div className="flex justify-end gap-2 border-t pt-2">- {(subscription.status === SubscriptionStatus.ACTIVE &&+ {/* 活跃或试用中且未设置周期结束时取消 - 显示取消订阅按钮 */}+ {((subscription.status === SubscriptionStatus.ACTIVE &&!subscription.cancelAtPeriodEnd) ||(subscription.status === SubscriptionStatus.TRIALING &&- !subscription.cancelAtPeriodEnd) ? (+ !subscription.cancelAtPeriodEnd)) && (<Button- variant="destructive"+ variant="outline"size="sm"onClick={() => handleUnsubscribe(subscription)}>{tProfile('cancelSubscription')}</Button>- ) : subscription.status === SubscriptionStatus.CANCELED &&- subscription.cancelAtPeriodEnd ? (+ )}+ {/* 活跃但设置了周期结束时取消 - 显示恢复订阅按钮 */}+ {(subscription.status === SubscriptionStatus.ACTIVE &&+ subscription.cancelAtPeriodEnd) && (<Button+ variant="outline"size="sm"onClick={() => handleResumeSubscription(subscription)}>{tProfile('resumeSubscription')}</Button>- ) : null}+ )}+ {/* 已完全取消的状态不显示任何按钮 */}</div></div>))}diff --git a/project/web/src/components/SettingsModal/tabs/ProfileTab.tsx b/project/web/src/components/SettingsModal/tabs/ProfileTab.tsxindex 0a73556e..4a31f4c4 100644--- a/project/web/src/components/SettingsModal/tabs/ProfileTab.tsx+++ b/project/web/src/components/SettingsModal/tabs/ProfileTab.tsx@@ -233,7 +233,7 @@ export function ProfileTab({ onClose }: ProfileTabProps) {<div className="grid grid-cols-2 gap-4"><div className="rounded-xl border border-border bg-muted p-4"><p className="mb-1 text-sm text-muted-foreground">{t('profile.totalIncome')}</p>- <p className="text-2xl font-bold text-foreground">¥{totalIncome.toFixed(2)}</p>+ <p className="text-2xl font-bold text-foreground">{totalIncome.toFixed(2)} USD</p></div></div>diff --git a/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsx b/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsxindex d8761c2e..75c3d8e2 100644--- a/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsx+++ b/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsx@@ -5,7 +5,7 @@'use client'-import { useCallback, useEffect, useState } from 'react'+import { useCallback, useEffect, useMemo, useState } from 'react'import { ChevronLeft, ChevronRight, Sparkles } from 'lucide-react'import { useShallow } from 'zustand/react/shallow'import { useTransClient } from '@/app/i18n/client'@@ -28,14 +28,35 @@ export function SubscriptionTab() {const { t } = useTransClient('settings')// 从 user store 读取余额状态- const { creditsBalance, creditsLoading, setCreditsBalance } = useUserStore(+ const { creditsBalance, creditsLoading, setCreditsBalance, userInfo } = useUserStore(useShallow(state => ({creditsBalance: state.creditsBalance,creditsLoading: state.creditsLoading,setCreditsBalance: state.setCreditsBalance,+ userInfo: state.userInfo,})),)+ // 判断用户是否为有效会员+ const isVip = useMemo(() => {+ const vipInfo = userInfo?.vipInfo+ if (!vipInfo || !vipInfo.expireTime) return false++ // 检查状态是否为有效会员状态(排除 expired 和 none)+ const validStatuses = [+ 'trialing',+ 'monthly_once',+ 'yearly_once',+ 'active_monthly',+ 'active_yearly',+ 'active_nonrenewing',+ ]+ if (!validStatuses.includes(vipInfo.status)) return false++ // 检查过期时间是否未过期+ return new Date(vipInfo.expireTime) > new Date()+ }, [userInfo])+// 本地余额加载状态(用于初次加载)const [balanceLoading, setBalanceLoading] = useState(true)@@ -200,10 +221,25 @@ export function SubscriptionTab() {${centsToUsd(creditsBalance)}</span></div>- )}+ )}</div>- <Button onClick={() => window.open('/pricing', '_blank')}>{t('subscription.upgrade')}</Button>+ {!isVip && (+ <Button onClick={() => window.open('/pricing', '_blank')}>+ {t('subscription.upgrade')}+ </Button>+ )}</div>+ {/* Agent 价格链接 */}+ <div className="pt-4 text-center">+ <a+ href="https://docs.aitoearn.ai/en/help-center/pricing/agent-price"+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline"+ >+ {t('subscription.viewAgentPricing')}+ </a>+ </div></div>{/* 使用记录 */}@@ -275,6 +311,8 @@ export function SubscriptionTab() {{/* 分页器 */}{!recordsLoading && records.length > 0 && renderPagination()}</div>++</div>)}diff --git a/project/web/src/components/common/DownloadAppModal.tsx b/project/web/src/components/common/DownloadAppModal.tsxindex 84f00c42..b777dc77 100644--- a/project/web/src/components/common/DownloadAppModal.tsx+++ b/project/web/src/components/common/DownloadAppModal.tsx@@ -84,23 +84,9 @@ export default function DownloadAppModal({/** 渲染 App 下载内容 */const renderAppContent = () => (<div className="flex flex-col items-center px-4 py-6">- {/* App Logo */}- <div className="mb-6">- <Image- src={logo}- alt="Aitoearn"- width={64}- height={64}- className="rounded-2xl shadow-lg"- />- </div>-- {/* 标题 */}- <h3 className="mb-4 text-xl font-semibold text-foreground">Aitoearn</h3>-{/* 描述 */}<p- className="mb-8 text-center text-sm leading-relaxed text-muted-foreground"+ className="mb-6 text-center text-sm leading-relaxed text-muted-foreground"dangerouslySetInnerHTML={{__html: t('downloadApp.operationDescription' as any, { platform }),}}@@ -136,7 +122,7 @@ export default function DownloadAppModal({{t('downloadApp.downloadLink')}</p><div className="flex items-center justify-between gap-3">- <span className="flex-1 break-all text-left text-sm text-foreground">+ <span className="flex-1 break-all text-left text-xs text-foreground">{actualDownloadUrl}</span><Buttondiff --git a/project/web/src/store/plugin/docs/README.md b/project/web/src/store/plugin/docs/README.mdindex d390a12b..9d77417d 100644--- a/project/web/src/store/plugin/docs/README.md+++ b/project/web/src/store/plugin/docs/README.md@@ -269,7 +269,7 @@ PUBLISH_STAGE_TEXT = {// 错误消息ERROR_MESSAGES = {- PLUGIN_NOT_INSTALLED: '请先安装 AIToEarn 浏览器插件',+ PLUGIN_NOT_INSTALLED: '请先安装 Aitoearn 浏览器插件',PUBLISHING_IN_PROGRESS: '当前正在发布中,请稍后再试',LOGIN_FAILED: '登录失败',PUBLISH_FAILED: '发布失败',diff --git a/project/web/src/store/plugin/store.ts b/project/web/src/store/plugin/store.tsindex ada5da60..bc546e7e 100644--- a/project/web/src/store/plugin/store.ts+++ b/project/web/src/store/plugin/store.ts@@ -84,7 +84,7 @@ export type PlatformAccountsMap = Record<PluginPlatformType, PlatAccountInfo | n/** 错误消息 */const ERROR_MESSAGES = {- PLUGIN_NOT_INSTALLED: '请先安装 AIToEarn 浏览器插件',+ PLUGIN_NOT_INSTALLED: '请先安装 Aitoearn 浏览器插件',PLUGIN_NOT_READY: '插件未就绪,请先授权插件权限',PUBLISHING_IN_PROGRESS: '当前正在发布中,请稍后再试',} as const