Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
fix: optimize agent (#435)
yikac9ece945f808
diff --git a/project/web/public/sitemap-0.xml b/project/web/public/sitemap-0.xmlindex 37e28a72..c25944bb 100644--- a/project/web/public/sitemap-0.xml+++ b/project/web/public/sitemap-0.xml@@ -1,54 +1,52 @@<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">-<url><loc>https://aitoearn.ai/healthz</loc><lastmod>2025-12-19T09:19:51.550Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en</loc><lastmod>2025-12-18T11:52:18.735Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>-<url><loc>https://aitoearn.ai/en/websit/terms-of-service</loc><lastmod>2025-12-19T03:13:18.752Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/websit/privacy-policy</loc><lastmod>2025-12-19T03:13:47.800Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/websit/plugin-guide</loc><lastmod>2025-12-19T03:09:16.800Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/websit/extension-privacy-policy</loc><lastmod>2025-12-19T03:12:31.547Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/websit/data-protection-agreement</loc><lastmod>2025-12-12T06:46:42.348Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/websit/data-deletion</loc><lastmod>2025-12-19T03:12:48.680Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/tasks-history</loc><lastmod>2025-12-19T02:55:09.033Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/tasks</loc><lastmod>2025-11-18T02:51:00.256Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/pricing</loc><lastmod>2025-12-18T11:52:18.737Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/pinterest</loc><lastmod>2025-12-18T11:52:18.736Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/material</loc><lastmod>2025-11-18T02:51:00.224Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/interactiveNew</loc><lastmod>2025-12-18T11:52:18.730Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/interactive</loc><lastmod>2025-12-18T11:52:18.725Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/hotContent</loc><lastmod>2025-11-18T02:51:00.185Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>-<url><loc>https://aitoearn.ai/en/dataStatistics</loc><lastmod>2025-11-18T02:51:00.115Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/data-monitoring</loc><lastmod>2025-12-18T11:52:18.722Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/chat/test</loc><lastmod>2025-12-18T11:52:18.720Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/cgmaterial</loc><lastmod>2025-11-18T02:51:00.099Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/auth/login</loc><lastmod>2025-12-18T11:52:18.715Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/auth/forgot-password</loc><lastmod>2025-12-18T11:52:18.710Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/aiRank</loc><lastmod>2025-11-18T02:51:00.092Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>-<url><loc>https://aitoearn.ai/en/aiRank/aiRanking</loc><lastmod>2025-11-18T02:51:00.078Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>-<url><loc>https://aitoearn.ai/en/accounts</loc><lastmod>2025-11-21T10:43:08.009Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/en/accounts/auth</loc><lastmod>2025-11-18T02:50:59.996Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN</loc><lastmod>2025-12-18T11:52:18.735Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/websit/terms-of-service</loc><lastmod>2025-12-19T03:13:18.752Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/websit/privacy-policy</loc><lastmod>2025-12-19T03:13:47.800Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/websit/plugin-guide</loc><lastmod>2025-12-19T03:09:16.800Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/websit/extension-privacy-policy</loc><lastmod>2025-12-19T03:12:31.547Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/websit/data-protection-agreement</loc><lastmod>2025-12-12T06:46:42.348Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/websit/data-deletion</loc><lastmod>2025-12-19T03:12:48.680Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/tasks-history</loc><lastmod>2025-12-19T02:55:09.033Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/tasks</loc><lastmod>2025-11-18T02:51:00.256Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/pricing</loc><lastmod>2025-12-18T11:52:18.737Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/pinterest</loc><lastmod>2025-12-18T11:52:18.736Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/material</loc><lastmod>2025-11-18T02:51:00.224Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/interactiveNew</loc><lastmod>2025-12-18T11:52:18.730Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/interactive</loc><lastmod>2025-12-18T11:52:18.725Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/hotContent</loc><lastmod>2025-11-18T02:51:00.185Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/dataStatistics</loc><lastmod>2025-11-18T02:51:00.115Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/data-monitoring</loc><lastmod>2025-12-18T11:52:18.722Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/chat/test</loc><lastmod>2025-12-18T11:52:18.720Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/cgmaterial</loc><lastmod>2025-11-18T02:51:00.099Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/auth/login</loc><lastmod>2025-12-18T11:52:18.715Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/auth/forgot-password</loc><lastmod>2025-12-18T11:52:18.710Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/aiRank</loc><lastmod>2025-11-18T02:51:00.092Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/aiRank/aiRanking</loc><lastmod>2025-11-18T02:51:00.078Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/accounts</loc><lastmod>2025-11-21T10:43:08.009Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>-<url><loc>https://aitoearn.ai/zh-CN/accounts/auth</loc><lastmod>2025-11-18T02:50:59.996Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/healthz</loc><lastmod>2025-12-20T16:52:30.750Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en</loc><lastmod>2025-12-20T16:48:43.924Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>+<url><loc>https://aitoearn.ai/en/websit/terms-of-service</loc><lastmod>2025-12-20T14:27:57.199Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/websit/privacy-policy</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/websit/plugin-guide</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/websit/extension-privacy-policy</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/websit/data-protection-agreement</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/websit/data-deletion</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/tasks-history</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/tasks</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/pricing</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/pinterest</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/material</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/interactiveNew</loc><lastmod>2025-12-20T14:27:57.192Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/hotContent</loc><lastmod>2025-12-20T14:27:57.190Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>+<url><loc>https://aitoearn.ai/en/dataStatistics</loc><lastmod>2025-12-20T14:27:57.187Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/data-monitoring</loc><lastmod>2025-12-20T16:50:21.070Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/chat/test</loc><lastmod>2025-12-20T14:27:57.185Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/cgmaterial</loc><lastmod>2025-12-20T14:27:57.184Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/auth/login</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/auth/forgot-password</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/aiRank</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>+<url><loc>https://aitoearn.ai/en/aiRank/aiRanking</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>+<url><loc>https://aitoearn.ai/en/accounts</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/en/accounts/auth</loc><lastmod>2025-12-20T14:27:57.179Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN</loc><lastmod>2025-12-20T16:48:43.924Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/websit/terms-of-service</loc><lastmod>2025-12-20T14:27:57.199Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/websit/privacy-policy</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/websit/plugin-guide</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/websit/extension-privacy-policy</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/websit/data-protection-agreement</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/websit/data-deletion</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/tasks-history</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/tasks</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/pricing</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/pinterest</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/material</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/interactiveNew</loc><lastmod>2025-12-20T14:27:57.192Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/hotContent</loc><lastmod>2025-12-20T14:27:57.190Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/dataStatistics</loc><lastmod>2025-12-20T14:27:57.187Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/data-monitoring</loc><lastmod>2025-12-20T16:50:21.070Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/chat/test</loc><lastmod>2025-12-20T14:27:57.185Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/cgmaterial</loc><lastmod>2025-12-20T14:27:57.184Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/auth/login</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/auth/forgot-password</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/aiRank</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/aiRank/aiRanking</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/accounts</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+<url><loc>https://aitoearn.ai/zh-CN/accounts/auth</loc><lastmod>2025-12-20T14:27:57.179Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url></urlset>\ No newline at end of filediff --git a/project/web/src/api/agent.ts b/project/web/src/api/agent.tsindex f292ed7f..5f7a12ac 100644--- a/project/web/src/api/agent.ts+++ b/project/web/src/api/agent.ts@@ -266,19 +266,19 @@ export const agentApi = {if (data.sessionId) {sessionId = data.sessionIdconsole.log('[SSE] Got sessionId:', sessionId)- }+ }- // 调用消息回调- onMessage(data)+ // 调用消息回调+ onMessage(data)- // 如果收到结束信号,关闭连接- if (data.type === 'done' || data.type === 'error') {- console.log('[SSE] Received end signal:', data.type)+ // 如果收到结束信号,关闭连接+ if (data.type === 'done' || data.type === 'error') {+ console.log('[SSE] Received end signal:', data.type)isCompleted = true- abortController.abort()- }+ abortController.abort()}- catch (error) {+ }+ catch (error) {console.error('[SSE] Failed to parse message:', event.data, error)}},@@ -288,7 +288,7 @@ export const agentApi = {console.log('[SSE] Connection closed')if (!isCompleted) {isCompleted = true- onDone(sessionId)+ onDone(sessionId)}},@@ -305,8 +305,8 @@ export const agentApi = {// 标记为已完成,防止重复处理if (!isCompleted) {isCompleted = true- // 其他错误,调用错误回调- onError(error instanceof Error ? error : new Error(String(error)))+ // 其他错误,调用错误回调+ onError(error instanceof Error ? error : new Error(String(error)))}// 抛出错误以停止重试diff --git a/project/web/src/app/[lng]/chat/[taskId]/utils/parseMessageContent.ts b/project/web/src/app/[lng]/chat/[taskId]/utils/parseMessageContent.tsindex ab28001c..2d530cfa 100644--- a/project/web/src/app/[lng]/chat/[taskId]/utils/parseMessageContent.ts+++ b/project/web/src/app/[lng]/chat/[taskId]/utils/parseMessageContent.ts@@ -165,9 +165,9 @@ export function parseUserMessageContent(content: string | any[]): IParsedUserCon*/export function formatMediaTypeName(type: 'image' | 'video' | 'document'): string {const names: Record<string, string> = {- image: '图片',- video: '视频',- document: '文档',+ image: 'Image',+ video: 'Video',+ document: 'Document',}return names[type] || type}diff --git a/project/web/src/app/[lng]/dataStatistics/components/DataStatisticsTable/index.tsx b/project/web/src/app/[lng]/dataStatistics/components/DataStatisticsTable/index.tsxindex 2238cc79..2159f621 100644--- a/project/web/src/app/[lng]/dataStatistics/components/DataStatisticsTable/index.tsx+++ b/project/web/src/app/[lng]/dataStatistics/components/DataStatisticsTable/index.tsx@@ -70,7 +70,7 @@ const DataStatisticsTable = memo(const columns = useMemo(() => {const columns: TableProps<StatisticsPeriodItems>['columns'] = [{- title: '账号',+ title: 'Account',key: 'uid',render: (text, item) => {const account = accountList.find(v => v.uid === item.uid)!diff --git a/project/web/src/app/[lng]/dataStatistics/useDataStatistics.tsx b/project/web/src/app/[lng]/dataStatistics/useDataStatistics.tsxindex ddb82183..8b6e6ff1 100644--- a/project/web/src/app/[lng]/dataStatistics/useDataStatistics.tsx+++ b/project/web/src/app/[lng]/dataStatistics/useDataStatistics.tsx@@ -200,7 +200,7 @@ export const useDataStatisticsStore = create(try {if (validAccounts.length === 0) {- toast.error('没有有效的账号数据')+ toast.error('No valid account data')return}@@ -216,7 +216,7 @@ export const useDataStatisticsStore = create(const result = res?.dataif (!result) {- toast.error('获取数据统计失败,请稍后重试')+ toast.error('Failed to get statistics, please try again later')return}@@ -226,8 +226,8 @@ export const useDataStatisticsStore = create(runDetection()}catch (error) {- console.error('获取数据统计失败', error)- toast.error('获取数据统计失败,请稍后重试')+ console.error('Failed to get statistics', error)+ toast.error('Failed to get statistics, please try again later')}finally {if (withLoading) {diff --git a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/CommentItem.tsx b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/CommentItem.tsxindex 2365bbb5..a93a3ea8 100644--- a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/CommentItem.tsx+++ b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/CommentItem.tsx@@ -31,24 +31,27 @@ function formatTime(timestamp: number): string {const hours = Math.floor(diff / 3600000)const days = Math.floor(diff / 86400000)- if (minutes < 1) return '刚刚'- if (minutes < 60) return `${minutes}分钟前`- if (hours < 24) return `${hours}小时前`- if (days < 7) return `${days}天前`+ if (minutes < 1) return 'Just now'+ if (minutes < 60) return `${minutes} min ago`+ if (hours < 24) return `${hours} hours ago`+ if (days < 7) return `${days} days ago`if (days < 365) {const date = new Date(timestamp)- return `${date.getMonth() + 1}月${date.getDate()}日`+ return `${date.getMonth() + 1}/${date.getDate()}`}const date = new Date(timestamp)- return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`+ return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`}/*** 格式化数字*/function formatCount(count: number): string {- if (count >= 10000) {- return `${(count / 10000).toFixed(1)}万`+ if (count >= 1000000) {+ return `${(count / 1000000).toFixed(1)}M`+ }+ if (count >= 1000) {+ return `${(count / 1000).toFixed(1)}K`}return String(count)}@@ -97,7 +100,7 @@ function CommentItem({{/* 用户名和标签 */}<div className="commentItem_header"><span className="commentItem_nickname">{comment.user.nickname}</span>- {comment.isAuthor && <span className="commentItem_authorTag">作者</span>}+ {comment.isAuthor && <span className="commentItem_authorTag">{t('author')}</span>}</div>{/* 评论内容 */}@@ -105,7 +108,7 @@ function CommentItem({{/* 回复目标 */}{isReply && comment.replyTo && (<span className="commentItem_replyTo">- 回复 <span className="commentItem_replyTo_name">@{comment.replyTo.user.nickname}</span>:+ {t('replyTo')} <span className="commentItem_replyTo_name">@{comment.replyTo.user.nickname}</span>:</span>)}{comment.content}diff --git a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/index.tsx b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/index.tsxindex 30586a58..927201a0 100644--- a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/index.tsx+++ b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/CommentList/index.tsx@@ -78,10 +78,10 @@ function CommentList({ workId, platform, commentCount, xsecToken }: CommentListPsetCursor(result.cursor)setHasMore(result.hasMore)} else {- setError(result.message || '加载评论失败')+ setError(result.message || 'Failed to load comments')}} catch (err) {- setError(err instanceof Error ? err.message : '加载评论失败')+ setError(err instanceof Error ? err.message : 'Failed to load comments')} finally {setLoading(false)setLoadingMore(false)diff --git a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/DetailSection.tsx b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/DetailSection.tsxindex 1f2f56d1..7eb7d81f 100644--- a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/DetailSection.tsx+++ b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/DetailSection.tsx@@ -156,7 +156,7 @@ function DetailSection() {<buttonclassName={`feedDetailModal_followBtn ${displayData.isFollowed ? 'feedDetailModal_followBtn-followed' : ''}`}>- {displayData.isFollowed ? t('followed') : '关注'}+ {displayData.isFollowed ? t('followed') : t('follow')}</button></div>@@ -212,16 +212,15 @@ function DetailSection() {</div></div>- {/* 评论区域 */}+ {/* Comments section */}<div className="feedDetailModal_comments"><div className="feedDetailModal_comments_header">- 共{' '}{loading || displayData.commentCount === null ? (<Spin indicator={<LoadingOutlined style={{ fontSize: 12 }} spin />} size="small" />) : (displayData.commentCount)}{' '}- 条评论+ {t('comments')}</div>{/* 评论列表 */}@@ -249,7 +248,7 @@ function DetailSection() {<div className="feedDetailModal_footer">{/* 评论输入框 */}<div className="feedDetailModal_commentInput">- <Input placeholder="说点什么..." className="feedDetailModal_commentInput_field" />+ <Input placeholder={t('commentPlaceholder')} className="feedDetailModal_commentInput_field" /></div>{/* 操作按钮 */}diff --git a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/MediaSection.tsx b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/MediaSection.tsxindex 60630906..184e797c 100644--- a/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/MediaSection.tsx+++ b/project/web/src/app/[lng]/interactiveNew/components/FeedDetailModal/MediaSection.tsx@@ -118,7 +118,7 @@ function MediaSection() {<>{/* 底层:封面占位图(防止闪烁) */}<div className="feedDetailModal_media_placeholder">- <img src={coverUrl} alt="封面" />+ <img src={coverUrl} alt="Cover" /></div>{/* 图片预览组件 - 支持多图预览 */}@@ -161,7 +161,7 @@ function MediaSection() {<div className="feedDetailModal_media_slideWrapper" onClick={handleImageClick}><Imagesrc={url}- alt={`图片 ${index + 1}`}+ alt={`Image ${index + 1}`}className="feedDetailModal_media_img"preview={false}fallback="/images/image-error.png"@@ -175,7 +175,7 @@ function MediaSection() {<div className="feedDetailModal_media_imageWrapper" onClick={handleImageClick}><Imagesrc={imageList[0] || coverUrl}- alt="封面"+ alt="Cover"className="feedDetailModal_media_img"preview={false}fallback="/images/image-error.png"diff --git a/project/web/src/app/[lng]/interactiveNew/useInteractive.ts b/project/web/src/app/[lng]/interactiveNew/useInteractive.tsindex a0224050..06eea351 100644--- a/project/web/src/app/[lng]/interactiveNew/useInteractive.ts+++ b/project/web/src/app/[lng]/interactiveNew/useInteractive.ts@@ -154,7 +154,7 @@ export function useInteractive() {...prev,loading: false,loadingMore: false,- error: result.message || '加载失败',+ error: result.message || 'Loading failed',}))}} catch (error) {@@ -162,7 +162,7 @@ export function useInteractive() {...prev,loading: false,loadingMore: false,- error: error instanceof Error ? error.message : '加载失败',+ error: error instanceof Error ? error.message : 'Loading failed',}))}}, [isPluginReady])diff --git a/project/web/src/app/[lng]/pinterest/page.tsx b/project/web/src/app/[lng]/pinterest/page.tsxindex 50b88237..fd2621a6 100644--- a/project/web/src/app/[lng]/pinterest/page.tsx+++ b/project/web/src/app/[lng]/pinterest/page.tsx@@ -895,7 +895,7 @@ export default function PinterestPage() {<div className={styles.uploadSuccess}><imgsrc={imagePreview}- alt="预览"+ alt="Preview"className={styles.previewImage}/><div className={styles.uploadStatus}>diff --git a/project/web/src/app/[lng]/tasks/taskPageCore.tsx b/project/web/src/app/[lng]/tasks/taskPageCore.tsxindex 75e672bc..b7654827 100644--- a/project/web/src/app/[lng]/tasks/taskPageCore.tsx+++ b/project/web/src/app/[lng]/tasks/taskPageCore.tsx@@ -369,11 +369,11 @@ export default function TaskPageCore() {})}- // 获取任务状态标签+ // Get task status tagconst getTaskStatusTag = (status: string) => {const statusMap: Record<string, { color: string, text: string }> = {- pending: { color: 'green', text: '已完成' }, // pending 是已完成- doing: { color: 'orange', text: '待完成' }, // doing 是待完成+ pending: { color: 'green', text: t('taskStatus.pending' as any) }, // pending means completed+ doing: { color: 'orange', text: t('taskStatus.doing' as any) }, // doing means pendingaccepted: { color: 'blue', text: t('taskStatus.accepted' as any) },completed: { color: 'green', text: t('taskStatus.completed' as any) },rejected: { color: 'red', text: t('taskStatus.rejected' as any) },@@ -597,8 +597,8 @@ export default function TaskPageCore() {}}catch (error) {- console.error('获取素材列表失败:', error)- toast.error('获取素材列表失败')+ console.error('Failed to get material list:', error)+ toast.error('Failed to get material list')}finally {setMaterialLoading(false)@@ -697,24 +697,24 @@ export default function TaskPageCore() {if (!task)return- // 验证是否选择了素材+ // Validate if material is selectedif (!selectedMaterial) {- toast.error('请选择一个草稿素材')+ toast.error('Please select a draft material')return}- // 关闭详情弹窗+ // Close detail modalsetTaskDetailModalVisible(false)- // 显示进度弹窗+ // Show progress modalsetTaskProgressVisible(true)setTaskProgress({currentStep: 0,steps: [- { title: '正在接受任务...', status: 'processing' },- { title: '正在发布任务...', status: 'wait' },- { title: '正在提交任务...', status: 'wait' },- { title: '任务完成', status: 'wait' },+ { title: 'Accepting task...', status: 'processing' },+ { title: 'Publishing task...', status: 'wait' },+ { title: 'Submitting task...', status: 'wait' },+ { title: 'Task completed', status: 'wait' },],})@@ -807,24 +807,24 @@ export default function TaskPageCore() {}, 1000)}else {- throw new Error('提交任务失败')+ throw new Error('Failed to submit task')}}else {- throw new Error('发布任务失败')+ throw new Error('Failed to publish task')}}else {- throw new Error('找不到发布账号信息')+ throw new Error('Cannot find publish account info')}}else {- throw new Error('接受任务失败')+ throw new Error('Failed to accept task')}}catch (error) {- console.error('任务处理失败:', error)- toast.error('任务处理失败')+ console.error('Task processing failed:', error)+ toast.error('Task processing failed')setTaskProgressVisible(false)}}@@ -870,15 +870,15 @@ export default function TaskPageCore() {})try {- // 更新进度:第一步完成,开始第二步+ // Update progress: step 1 complete, start step 2setTaskProgress(prev => ({...prev,currentStep: 1,steps: [- { title: '正在完成任务...', status: 'finish' },- { title: '正在发布任务...', status: 'processing' },- { title: '正在提交任务...', status: 'wait' },- { title: '任务完成', status: 'wait' },+ { title: 'Completing task...', status: 'finish' },+ { title: 'Publishing task...', status: 'processing' },+ { title: 'Submitting task...', status: 'wait' },+ { title: 'Task completed', status: 'wait' },],}))@@ -922,15 +922,15 @@ export default function TaskPageCore() {const publishResponse: any = await apiCreatePublish(publishData)if (publishResponse && publishResponse.code === 0) {- // 更新进度:第二步完成,开始第三步+ // Update progress: step 2 complete, start step 3setTaskProgress(prev => ({...prev,currentStep: 2,steps: [- { title: '正在完成任务...', status: 'finish' },- { title: '正在发布任务...', status: 'finish' },- { title: '正在提交任务...', status: 'processing' },- { title: '任务完成', status: 'wait' },+ { title: 'Completing task...', status: 'finish' },+ { title: 'Publishing task...', status: 'finish' },+ { title: 'Submitting task...', status: 'processing' },+ { title: 'Task completed', status: 'wait' },],}))@@ -939,15 +939,15 @@ export default function TaskPageCore() {const submitResponse: any = await submitTask(userTaskId, acceptedTaskDetail.task?.materialIds[0])if (submitResponse && submitResponse.code === 0) {- // 更新进度:第三步完成,开始第四步+ // Update progress: step 3 complete, start step 4setTaskProgress(prev => ({...prev,currentStep: 3,steps: [- { title: '正在完成任务...', status: 'finish' },- { title: '正在发布任务...', status: 'finish' },- { title: '正在提交任务...', status: 'finish' },- { title: '任务完成', status: 'finish' },+ { title: 'Completing task...', status: 'finish' },+ { title: 'Publishing task...', status: 'finish' },+ { title: 'Submitting task...', status: 'finish' },+ { title: 'Task completed', status: 'finish' },],}))@@ -961,25 +961,25 @@ export default function TaskPageCore() {}, 1000)}else {- throw new Error('提交任务失败')+ throw new Error('Failed to submit task')}}else {- throw new Error('发布任务失败')+ throw new Error('Failed to publish task')}}else {- throw new Error('找不到发布账号信息')+ throw new Error('Cannot find publish account info')}}catch (error) {- console.error('任务处理失败:', error)- toast.error('任务处理失败')+ console.error('Task processing failed:', error)+ toast.error('Task processing failed')setTaskProgressVisible(false)}}- // 处理待接受任务分页变化+ // Handle pending task page changeconst handlePendingPageChange = (page: number, pageSize?: number) => {fetchPendingTasks(page, pageSize || pendingPagination.pageSize)}@@ -1112,8 +1112,8 @@ export default function TaskPageCore() {</div><h3 style={{ margin: 0, fontSize: '16px' }}>{task.accountTypes && task.accountTypes.length > 0- ? `${task.accountTypes.map((type: string) => getPlatformName(type)).join('、')}任务`- : `${getPlatformName(task.accountType)}任务`}+ ? `${task.accountTypes.map((type: string) => getPlatformName(type)).join(', ')} Task`+ : `${getPlatformName(task.accountType)} Task`}</h3></div><Tag color="orange">{t('taskStatus.pending' as any)}</Tag>@@ -1177,7 +1177,7 @@ export default function TaskPageCore() {><Imagesrc={publishAccount.avatar ? getOssUrl(publishAccount.avatar) : '/default-avatar.png'}- alt="账号头像"+ alt="Account avatar"width={32}height={32}style={{@@ -1334,7 +1334,7 @@ export default function TaskPageCore() {><Imagesrc={publishAccount.avatar ? getOssUrl(publishAccount.avatar) : '/default-avatar.png'}- alt="账号头像"+ alt="Account avatar"width={32}height={32}style={{@@ -2320,7 +2320,7 @@ export default function TaskPageCore() {avatar={(<Imagesrc={account.avatar ? getOssUrl(account.avatar) : '/default-avatar.png'}- alt="账号头像"+ alt="Account avatar"width={48}height={48}style={{diff --git a/project/web/src/app/config/appDownloadConfig.ts b/project/web/src/app/config/appDownloadConfig.tsindex e64af430..757a0428 100644--- a/project/web/src/app/config/appDownloadConfig.ts+++ b/project/web/src/app/config/appDownloadConfig.ts@@ -136,30 +136,30 @@ export function getMainAppDownloadUrlSync(lng?: string): string {export const APP_DOWNLOAD_CONFIGS: Record<string, AppDownloadConfig> = {xhs: {- platform: '小红书',- appName: '小红书App',- downloadUrl: 'https://apps.apple.com/cn/app/id123456789', // 这里配置实际的下载链接- qrCodeUrl: '', // 这里配置实际的二维码图片URL- description: '小红书相关操作需要在移动端App中进行,请下载并安装小红书App后继续操作。',+ platform: 'Xiaohongshu',+ appName: 'Xiaohongshu App',+ downloadUrl: 'https://apps.apple.com/cn/app/id123456789', // Configure actual download link here+ qrCodeUrl: '', // Configure actual QR code image URL here+ description: 'Xiaohongshu operations need to be performed in the mobile app. Please download and install the Xiaohongshu App to continue.',tips: [- '安装完成后,请在App中登录您的账号',- '确保账号已通过实名认证',- '在App中完成相关任务操作',+ 'After installation, please log in to your account in the App',+ 'Ensure your account has completed identity verification',+ 'Complete related task operations in the App',],},douyin: {- platform: '抖音',- appName: '抖音App',+ platform: 'Douyin',+ appName: 'Douyin App',downloadUrl: 'https://apps.apple.com/cn/app/douyin/id123456789',qrCodeUrl: '',- description: '抖音相关操作需要在移动端App中进行,请下载并安装抖音App后继续操作。',+ description: 'Douyin operations need to be performed in the mobile app. Please download and install the Douyin App to continue.',tips: [- '安装完成后,请在App中登录您的账号',- '确保账号已通过实名认证',- '在App中完成相关任务操作',+ 'After installation, please log in to your account in the App',+ 'Ensure your account has completed identity verification',+ 'Complete related task operations in the App',],},- // 可以继续添加其他平台的配置+ // Additional platform configurations can be added here}/**diff --git a/project/web/src/app/i18n/locales/en/dataStatistics.json b/project/web/src/app/i18n/locales/en/dataStatistics.jsonindex de98c6d8..4b31c277 100644--- a/project/web/src/app/i18n/locales/en/dataStatistics.json+++ b/project/web/src/app/i18n/locales/en/dataStatistics.json@@ -13,7 +13,7 @@"loginFailed": "Login Failed","relogin": "Relogin","dataDetails": "Data Details",- "timeRange": "Time Range:",+ "timeRange": "Time Range:","yesterdayIncrease": "Yesterday Increase","readCount": "Views","commentCount": "Comments",diff --git a/project/web/src/app/i18n/locales/en/pricing.json b/project/web/src/app/i18n/locales/en/pricing.jsonindex c2ced283..03b4290e 100644--- a/project/web/src/app/i18n/locales/en/pricing.json+++ b/project/web/src/app/i18n/locales/en/pricing.json@@ -280,7 +280,7 @@"channel": "yun"},{- "model": "kling2.1大师",+ "model": "kling2.1-master","type": "Video Generation","duration": "5s","resolution": "1080p",@@ -290,7 +290,7 @@"channel": "yun"},{- "model": "kling2.1大师",+ "model": "kling2.1-master","type": "Video Generation","duration": "10s","resolution": "1080p",@@ -320,7 +320,7 @@"channel": "yun"},{- "model": "wan2.1-turbo(14b)",+ "model": "wan2.1-turbo(14b)","type": "Video Generation","duration": "5s","resolution": "720p",diff --git a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/VipEntry.tsx b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/VipEntry.tsxindex 66605668..68b59ff6 100644--- a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/VipEntry.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/VipEntry.tsx@@ -18,13 +18,21 @@ import { cn } from '@/lib/utils'import { useUserStore } from '@/store/user'import type { SidebarCommonProps } from '../../types'+// 有效的 VIP 会员状态+const ACTIVE_VIP_STATUSES = ['active_monthly', 'active_yearly', 'active_nonrenewing', 'monthly_once', 'yearly_once']+export function VipEntry({ collapsed }: SidebarCommonProps) {const { t } = useTransClient('common')const lng = useGetClientLng()const userInfo = useUserStore(state => state.userInfo)- // 判断用户是否是有效会员- const isVip = userInfo?.vipInfo?.expireTime && new Date(userInfo.vipInfo.expireTime) > new Date()+ // 判断用户是否是有效会员:需要有有效的状态且未过期+ const isVip = Boolean(+ userInfo?.vipInfo?.status &&+ ACTIVE_VIP_STATUSES.includes(userInfo.vipInfo.status) &&+ userInfo.vipInfo.expireTime &&+ new Date(userInfo.vipInfo.expireTime) > new Date()+ )return (<TooltipProvider>diff --git a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsx b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsxindex 5347a07e..2a8e56fb 100644--- a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/index.tsx@@ -15,7 +15,7 @@ export function BottomSection({ collapsed, onOpenSettings }: BottomSectionProps)return (<divclassName={cn(- 'mt-auto flex flex-col gap-1 border-t border-sidebar-border pt-3',+ 'flex flex-col gap-1 border-t border-sidebar-border pt-3',collapsed && 'items-center',)}>diff --git a/project/web/src/app/layout/LayoutSidebar/components/NavSection.tsx b/project/web/src/app/layout/LayoutSidebar/components/NavSection.tsxindex 1a38d9b5..8f8bbb0c 100644--- a/project/web/src/app/layout/LayoutSidebar/components/NavSection.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/NavSection.tsx@@ -126,7 +126,7 @@ export function NavSection({ items, currentRoute, collapsed, onAddChannel }: Navconst insertIndex = interactiveIndex !== -1 ? interactiveIndex + 1 : 4return (- <nav className="flex flex-1 flex-col gap-1">+ <nav className="flex flex-col gap-1">{items.map((item, index) => (<div key={item.path || item.translationKey}><NavItemdiff --git a/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsx b/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsxindex 984ddc9b..9544fd3f 100644--- a/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsx+++ b/project/web/src/app/layout/LayoutSidebar/components/UserSection.tsx@@ -79,7 +79,7 @@ export function UserSection({ collapsed, onLogin, onOpenSettings }: UserSectionP<Tooltip><TooltipTrigger asChild><Button onClick={onLogin} size="icon" className="h-9 w-9">- <span className="text-sm font-semibold">登</span>+ <span className="text-sm font-semibold">In</span></Button></TooltipTrigger><TooltipContent side="right">diff --git a/project/web/src/app/layout/LayoutSidebar/index.tsx b/project/web/src/app/layout/LayoutSidebar/index.tsxindex d966fd28..46cf39cf 100644--- a/project/web/src/app/layout/LayoutSidebar/index.tsx+++ b/project/web/src/app/layout/LayoutSidebar/index.tsx@@ -161,7 +161,7 @@ const LayoutSidebar = () => {// 打开添加账号弹窗const handleAddChannel = () => {if (!token) {- toast.warning('请先登录')+ toast.warning('Please login first')openLoginModal(() => setAddAccountVisible(true))return}@@ -183,49 +183,54 @@ const LayoutSidebar = () => {collapsed ? 'w-[68px] min-w-[68px]' : 'w-[220px] min-w-[220px]',)}>- {/* Logo 区域 */}+ {/* Logo 区域 - 固定 */}<LogoSectioncollapsed={collapsed}onToggle={() => setCollapsed(!collapsed)}/>- {/* 主导航区域 */}- <NavSection- items={navItems}- currentRoute={currRouter}- collapsed={collapsed}- onAddChannel={handleAddChannel}- />-- {/* 推广赚钱入口 - 在底部功能区横线上方 */}- <div className="mt-auto pb-1">- <AffiliatesEntry collapsed={collapsed} />+ {/* 可滚动区域:主导航 */}+ <div className="flex-1 min-h-0 overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent">+ <NavSection+ items={navItems}+ currentRoute={currRouter}+ collapsed={collapsed}+ onAddChannel={handleAddChannel}+ /></div>- {/* 底部功能区 */}- <BottomSection- collapsed={collapsed}- onOpenSettings={handleOpenSettings}- />+ {/* 底部固定区域 - 不随滚动 */}+ <div className="flex-shrink-0">+ {/* 推广赚钱入口 - 在底部功能区横线上方 */}+ <div className="pb-1">+ <AffiliatesEntry collapsed={collapsed} />+ </div>- {/* 底部图标栏 */}- <IconBar- collapsed={collapsed}- isLoggedIn={!!token}- unreadCount={unreadCount}- onOpenNotification={() => setNotificationVisible(true)}- onOpenSettings={handleOpenSettings}- />+ {/* 底部功能区 */}+ <BottomSection+ collapsed={collapsed}+ onOpenSettings={handleOpenSettings}+ />- {/* 用户头像 / 登录按钮 */}- <UserSection- collapsed={collapsed}- onLogin={handleLogin}- onOpenSettings={handleOpenSettings}- />+ {/* 底部图标栏 */}+ <IconBar+ collapsed={collapsed}+ isLoggedIn={!!token}+ unreadCount={unreadCount}+ onOpenNotification={() => setNotificationVisible(true)}+ onOpenSettings={handleOpenSettings}+ />- {/* 外部链接 - Docs 和 GitHub */}- <ExternalLinks collapsed={collapsed} />+ {/* 用户头像 / 登录按钮 */}+ <UserSection+ collapsed={collapsed}+ onLogin={handleLogin}+ onOpenSettings={handleOpenSettings}+ />++ {/* 外部链接 - Docs 和 GitHub */}+ <ExternalLinks collapsed={collapsed} />+ </div></aside>{/* 通知面板 */}@@ -247,7 +252,7 @@ const LayoutSidebar = () => {onClose={() => setAddAccountVisible(false)}onAddSuccess={() => {setAddAccountVisible(false)- toast.success('账号添加成功')+ toast.success('Account added successfully')}}showSpaceSelector={true}/>diff --git a/project/web/src/app/layout/routerData.tsx b/project/web/src/app/layout/routerData.tsxindex ce3d5379..4b6413a1 100644--- a/project/web/src/app/layout/routerData.tsx+++ b/project/web/src/app/layout/routerData.tsx@@ -28,44 +28,44 @@ export interface IRouterDataItem {export const routerData: IRouterDataItem[] = [{- name: '首页',+ name: 'Home',translationKey: 'home',path: '/',icon: <Home size={20} />,},{- name: '任务记录',+ name: 'Task History',translationKey: 'tasksHistory',path: '/tasks-history',icon: <History size={20} />,},{- name: '发布',+ name: 'Publish',translationKey: 'accounts',path: '/accounts',icon: <Upload size={20} />,},{- name: '互动数据',+ name: 'Engage',translationKey: 'interactive',path: '/interactiveNew',icon: <MessageCircle size={20} />,},- // Tasks (任务中心) 已移至站内信通知面板中+ // Tasks moved to notification panel{- name: '数据统计',+ name: 'Data Statistics',translationKey: 'dataStatistics',path: '/dataStatistics',icon: <BarChart3 size={20} />,},{- name: '素材库',+ name: 'Material Library',translationKey: 'header.materialLibrary',path: '/material',icon: <FolderOpen size={20} />,},{- name: '草稿箱',+ name: 'Draft Box',translationKey: 'header.draftBox',path: '/cgmaterial',icon: <FileText size={20} />,diff --git a/project/web/src/components/SettingsModal/index.tsx b/project/web/src/components/SettingsModal/index.tsxindex 7d59d04c..28a4b113 100644--- a/project/web/src/components/SettingsModal/index.tsx+++ b/project/web/src/components/SettingsModal/index.tsx@@ -2,12 +2,13 @@* SettingsModal - 设置弹框组件* 包含个人资料、Agent、通用设置等功能* 采用可扩展的 Tab 配置结构+ * 支持移动端响应式布局*/'use client'import type { ReactNode } from 'react'-import { Bot, CreditCard, Crown, Globe, User } from 'lucide-react'+import { CreditCard, Crown, Globe, User } from 'lucide-react'import Image from 'next/image'import { useEffect, useState } from 'react'import { useTransClient } from '@/app/i18n/client'@@ -108,22 +109,23 @@ export const SettingsModal = ({ open, onClose, defaultTab }: SettingsModalProps)return (<Dialog open={open} onOpenChange={isOpen => !isOpen && onClose()}><DialogContent- className="max-w-[880px] gap-0 overflow-hidden p-0"+ className="w-[95vw] max-w-[880px] gap-0 overflow-hidden p-0 md:w-[880px]"aria-describedby={undefined}><DialogTitle className="sr-only">{t('title')}</DialogTitle>- <div className="flex h-[70vh]">- {/* 左侧侧边栏 */}- <div className="flex w-52 shrink-0 flex-col border-r border-border">+ {/* 移动端布局:垂直排列;桌面端:水平排列 */}+ <div className="flex h-[80vh] max-h-[600px] flex-col md:h-[70vh] md:max-h-none md:flex-row">+ {/* 侧边栏/顶部导航 */}+ <div className="flex w-full shrink-0 flex-col border-b border-border md:w-48 md:border-b-0 md:border-r">{/* 侧边栏头部 - Logo + 项目名称 */}- <div className="flex shrink-0 items-center gap-2 px-5 py-4">- <Image src={logo} alt="Aitoearn" width={28} height={28} />- <span className="text-base font-semibold tracking-tight text-foreground">Aitoearn</span>+ <div className="flex shrink-0 items-center gap-2 px-4 py-3 md:px-5 md:py-4">+ <Image src={logo} alt="Aitoearn" width={24} height={24} className="md:h-7 md:w-7" />+ <span className="text-sm font-semibold tracking-tight text-foreground md:text-base">Aitoearn</span></div>- {/* Tab 列表 */}- <div className="flex flex-1 flex-col gap-1 px-4 pb-4">+ {/* Tab 列表 - 移动端水平滚动,桌面端垂直列表 */}+ <div className="flex gap-1 overflow-x-auto px-3 pb-3 md:flex-col md:overflow-x-visible md:px-3 md:pb-4">{visibleTabs.map((tab) => {const isActive = activeTab === tab.key@@ -132,30 +134,32 @@ export const SettingsModal = ({ open, onClose, defaultTab }: SettingsModalProps)key={tab.key}onClick={() => setActiveTab(tab.key)}className={cn(- 'flex items-center gap-2 rounded-md px-3 py-2.5 text-left text-sm transition-all',+ 'flex shrink-0 items-center gap-1.5 rounded-md px-3 py-2 text-left text-sm transition-all md:gap-2 md:py-2.5',isActive? 'bg-muted font-medium text-foreground': 'text-muted-foreground hover:bg-muted hover:text-foreground',)}>{tab.icon}- {tab.label}+ <span className="whitespace-nowrap">{tab.label}</span></button>)})}</div></div>- {/* 右侧内容区域 */}- <div className="flex flex-1 flex-col overflow-hidden min-h-0">+ {/* 右侧/下方内容区域 */}+ <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden">{/* 右侧头部 - 设置标题 */}- <div className="flex shrink-0 items-center border-b border-border px-8 py-4">- <h2 className="text-lg font-semibold text-foreground">{t('title')}</h2>+ <div className="flex shrink-0 items-center border-b border-border px-4 py-3 md:px-8 md:py-4">+ <h2 className="text-base font-semibold text-foreground md:text-lg">{t('title')}</h2></div>- {/* 右侧内容 */}- <div className="flex-1 overflow-y-auto px-8 py-6">- {renderContent()}+ {/* 右侧内容 - 确保内容区域可以正确滚动和换行 */}+ <div className="flex-1 overflow-y-auto overflow-x-hidden px-4 py-4 md:px-8 md:py-6">+ <div className="w-full">+ {renderContent()}+ </div></div></div></div>diff --git a/project/web/src/components/SettingsModal/tabs/GeneralTab.tsx b/project/web/src/components/SettingsModal/tabs/GeneralTab.tsxindex ca02b88a..de62ac13 100644--- a/project/web/src/components/SettingsModal/tabs/GeneralTab.tsx+++ b/project/web/src/components/SettingsModal/tabs/GeneralTab.tsx@@ -51,12 +51,12 @@ export function GeneralTab() {}return (- <div className="space-y-8">+ <div className="w-full space-y-8">{/* 外观主题 */}<div><h4 className="text-sm font-medium text-foreground mb-1">{t('general.theme')}</h4><p className="text-sm text-muted-foreground mb-4">{t('general.themeDesc')}</p>- <div className="flex gap-4">+ <div className="flex flex-wrap gap-3 md:gap-4">{themeOptions.map(option => {const isActive = theme === option.valuereturn (@@ -68,7 +68,7 @@ export function GeneralTab() {{/* 图片容器 */}<divclassName={cn(- 'relative w-20 h-14 rounded-lg overflow-hidden border-2 transition-all',+ 'relative w-16 h-11 md:w-20 md:h-14 rounded-lg overflow-hidden border-2 transition-all',isActive? 'border-primary shadow-sm': 'border-border hover:border-muted-foreground'@@ -97,13 +97,13 @@ export function GeneralTab() {</div>{/* 网站语言 */}- <div className="flex items-center justify-between">- <div>+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">+ <div className="min-w-0 flex-1"><h4 className="text-sm font-medium text-foreground">{t('general.language')}</h4><p className="mt-0.5 text-sm text-muted-foreground">{t('general.languageDesc')}</p></div><Select value={lng} onValueChange={handleLanguageChange}>- <SelectTrigger className="h-9 w-[140px]">+ <SelectTrigger className="h-9 w-full sm:w-[140px]"><SelectValue /></SelectTrigger><SelectContent>diff --git a/project/web/src/components/SettingsModal/tabs/ProfileTab.tsx b/project/web/src/components/SettingsModal/tabs/ProfileTab.tsxindex e8af7f3b..35f3ae34 100644--- a/project/web/src/components/SettingsModal/tabs/ProfileTab.tsx+++ b/project/web/src/components/SettingsModal/tabs/ProfileTab.tsx@@ -154,7 +154,7 @@ export function ProfileTab({ onClose }: ProfileTabProps) {const currentBalance = (userInfo?.income || 0) / 100return (- <div className="space-y-6">+ <div className="w-full space-y-6">{/* 用户信息卡片 */}<div className="flex items-center gap-4"><div className="group relative shrink-0 cursor-pointer" onClick={handleAvatarClick}>diff --git a/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsx b/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsxindex 75c3d8e2..f06932b1 100644--- a/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsx+++ b/project/web/src/components/SettingsModal/tabs/SubscriptionTab.tsx@@ -202,13 +202,13 @@ export function SubscriptionTab() {}return (- <div className="space-y-6">+ <div className="w-full space-y-6">{/* 余额卡片 */}- <div className="rounded-xl border border-border bg-card p-6">- <div className="flex items-center justify-between">- <div>+ <div className="rounded-xl border border-border bg-card p-4 md:p-6">+ <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">+ <div className="min-w-0 flex-1"><div className="flex items-center gap-2 text-muted-foreground">- <Sparkles className="h-4 w-4" />+ <Sparkles className="h-4 w-4 shrink-0" /><span className="text-sm font-medium">{t('subscription.balance')}</span></div>{balanceLoading || creditsLoading@@ -224,35 +224,35 @@ export function SubscriptionTab() {)}</div>{!isVip && (- <Button onClick={() => window.open('/pricing', '_blank')}>+ <Button className="shrink-0" 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 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 break-words"+ >+ {t('subscription.viewAgentPricing')}+ </a>+ </div></div>{/* 使用记录 */}- <div>+ <div className="w-full min-w-0"><h4 className="mb-4 text-sm font-medium text-foreground">{t('subscription.usageRecords')}</h4>- {/* 表头 */}- <div className="grid grid-cols-12 gap-4 border-b border-border px-2 pb-3 text-xs font-medium text-muted-foreground">- <div className="col-span-6">{t('subscription.detail')}</div>- <div className="col-span-3">{t('subscription.date')}</div>- <div className="col-span-3 text-right">{t('subscription.amountChange')}</div>+ {/* 表头 - 移动端隐藏日期列 */}+ <div className="grid grid-cols-2 gap-2 border-b border-border px-2 pb-3 text-xs font-medium text-muted-foreground md:grid-cols-12 md:gap-4">+ <div className="md:col-span-6">{t('subscription.detail')}</div>+ <div className="hidden md:col-span-3 md:block">{t('subscription.date')}</div>+ <div className="text-right md:col-span-3">{t('subscription.amountChange')}</div></div>{/* 记录列表 */}@@ -261,14 +261,14 @@ export function SubscriptionTab() {? (// 骨架屏Array.from({ length: 5 }).map((_, i) => (- <div key={i} className="grid grid-cols-12 gap-4 px-2 py-3">- <div className="col-span-6">+ <div key={i} className="grid grid-cols-2 gap-2 px-2 py-3 md:grid-cols-12 md:gap-4">+ <div className="md:col-span-6"><Skeleton className="h-4 w-3/4" /></div>- <div className="col-span-3">+ <div className="hidden md:col-span-3 md:block"><Skeleton className="h-4 w-full" /></div>- <div className="col-span-3 flex justify-end">+ <div className="flex justify-end md:col-span-3"><Skeleton className="h-4 w-16" /></div></div>@@ -284,20 +284,20 @@ export function SubscriptionTab() {records.map(record => (<divkey={record.id}- className="grid grid-cols-12 gap-4 px-2 py-3 text-sm"+ className="grid grid-cols-2 gap-2 px-2 py-3 text-sm md:grid-cols-12 md:gap-4">{/* 详情 */}- <div className="col-span-6 truncate text-foreground">+ <div className="min-w-0 truncate text-foreground md:col-span-6">{record.description || t(`subscription.types.${record.type}`)}</div>- {/* 日期 */}- <div className="col-span-3 text-muted-foreground">+ {/* 日期 - 移动端隐藏 */}+ <div className="hidden text-muted-foreground md:col-span-3 md:block">{formatDate(record.createdAt)}</div>{/* 金额变更 */}<divclassName={cn(- 'col-span-3 text-right font-medium',+ 'text-right font-medium md:col-span-3',record.amount >= 0 ? 'text-green-600' : 'text-foreground',)}>