From 4d1bf9094316b30af34821e2fb2628cf55c52720 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:19:02 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix(ui):=20=E8=AF=A6=E6=83=85=E9=A1=B5=20?= =?UTF-8?q?Flex=20=E8=A1=A5=20vertical=EF=BC=8C=E6=81=A2=E5=A4=8D=E7=BA=B5?= =?UTF-8?q?=E5=90=91=E5=8D=A1=E7=89=87=E5=B8=83=E5=B1=80=EF=BC=88=E8=B5=B0?= =?UTF-8?q?=E6=9F=A5=20P0-#1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/attempts/$id/index.tsx | 2 +- web/src/pages/browsers/$id/index.tsx | 2 +- web/src/pages/drafts/$id/index.tsx | 10 +++++----- web/src/pages/network-exits/$id/index.tsx | 2 +- web/src/pages/tasks/$id/index.tsx | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/web/src/pages/attempts/$id/index.tsx b/web/src/pages/attempts/$id/index.tsx index 9bd7b04..af753d6 100644 --- a/web/src/pages/attempts/$id/index.tsx +++ b/web/src/pages/attempts/$id/index.tsx @@ -42,7 +42,7 @@ export default function Page() { - + {attempt.outcome || '执行中'} {dateTime(attempt.started_at)} diff --git a/web/src/pages/browsers/$id/index.tsx b/web/src/pages/browsers/$id/index.tsx index e46e987..8bb8c52 100644 --- a/web/src/pages/browsers/$id/index.tsx +++ b/web/src/pages/browsers/$id/index.tsx @@ -57,7 +57,7 @@ export default function Page() { - + {stateText[runtime.state] ?? `未知状态:${runtime.state}`} diff --git a/web/src/pages/drafts/$id/index.tsx b/web/src/pages/drafts/$id/index.tsx index a43d8a5..01e0266 100644 --- a/web/src/pages/drafts/$id/index.tsx +++ b/web/src/pages/drafts/$id/index.tsx @@ -135,12 +135,12 @@ export default function Page() { } /> ) : null} - + {draft.content} - + {draft.account.version} {draft.version} @@ -151,7 +151,7 @@ export default function Page() { - + {versions.map((item: any) => item.id === draft.id ? ( @@ -166,7 +166,7 @@ export default function Page() { - + setReviewed(e.target.checked)}> 我已核对当前账号、草稿内容、运行环境和网络出口 @@ -193,7 +193,7 @@ export default function Page() { {tasks.length === 0 ? ( 尚未入队。 ) : ( - + {tasks.map((task: any) => ( {task.id} diff --git a/web/src/pages/network-exits/$id/index.tsx b/web/src/pages/network-exits/$id/index.tsx index 66e1620..642841c 100644 --- a/web/src/pages/network-exits/$id/index.tsx +++ b/web/src/pages/network-exits/$id/index.tsx @@ -52,7 +52,7 @@ export default function Page() { - + {known ? healthText[exit.health_status] : `未知状态:${exit.health_status}`} diff --git a/web/src/pages/tasks/$id/index.tsx b/web/src/pages/tasks/$id/index.tsx index a618604..ba749da 100644 --- a/web/src/pages/tasks/$id/index.tsx +++ b/web/src/pages/tasks/$id/index.tsx @@ -110,7 +110,7 @@ export default function Page() { key: 'status', label: '当前状态', children: ( - + {stateText[task.state] || `未知状态:${task.state}`} {holdLabel(task.hold_reason)} @@ -123,7 +123,7 @@ export default function Page() { key: 'confirmation', label: '确认快照', children: ( - + {confirmation.id || '未记录'} · v{confirmation.version || '—'} @@ -148,7 +148,7 @@ export default function Page() { key: 'execution', label: '执行关联', children: ( - + {task.browser_env_alias || '未记录'} {task.network_exit_id || '未记录'} @@ -175,7 +175,7 @@ export default function Page() { key: 'action', label: '唯一安全动作', children: ( - + {task.readiness_reason ? : null} {task.allowed_action === 'verify' ? ( <> @@ -237,7 +237,7 @@ export default function Page() { 执行尝试 {task.attempts?.length ? ( - + {task.attempts.map((attempt: any) => ( history.push(`/attempts/${encodeURIComponent(attempt.id)}`)}>{attempt.id} From 01624ace01006de34fd8a09ae1faf56cbd2e4ccb Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:19:37 +0800 Subject: [PATCH 02/12] =?UTF-8?q?fix(ui):=20=E5=B7=A5=E4=BD=9C=E5=8F=B0?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B0=B8=E4=B9=85=20loading=20=E9=AA=A8?= =?UTF-8?q?=E6=9E=B6=EF=BC=8C=E6=94=B9=20Empty=20=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=EF=BC=88=E8=B5=B0=E6=9F=A5=20P0-#2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/dashboard/index.tsx | 37 ++++++++----------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/web/src/pages/dashboard/index.tsx b/web/src/pages/dashboard/index.tsx index fdd03b9..f7e6cb1 100644 --- a/web/src/pages/dashboard/index.tsx +++ b/web/src/pages/dashboard/index.tsx @@ -1,34 +1,15 @@ -// 工作台:对标 pro 官方 workplace 预览的占位页。 -// 统计卡片与快捷入口暂不接真实数据(后期规划),仅布局占位;不引入兜底数据。 -import { Card, Col, Empty, Row, Typography } from 'antd'; +// 工作台:占位页。数据看板未实现,不渲染假加载骨架,直接以 Empty 说明现状;不引入兜底数据。 +import { Card, Empty, Typography } from 'antd'; -// 统计卡片与快捷入口暂不接真实数据(后期规划),仅布局占位;不引入兜底数据。 // 页面标题由全局布局的 PageContainer 提供,这里只渲染内容区。 export default function Page() { return ( - <> - - - - - - - - - - - - - - - 统计指标规划中} - > - - - + 统计指标规划中} + > + + ); } From e52d8c797bd2caa128429ebc8cefc2dd56c9acc3 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:20:17 +0800 Subject: [PATCH 03/12] =?UTF-8?q?fix(ui):=20=E6=88=91=E7=9A=84=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=88=97=E8=A1=A8=E6=8C=89=E9=92=AE=E8=BF=9B=20Card?= =?UTF-8?q?=20=E5=8F=B3=E4=B8=8A=E8=A7=92=E3=80=81=E8=A1=A5=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E3=80=81=E5=88=A0=E5=B9=B3=E5=8F=B0=E5=88=97=EF=BC=88?= =?UTF-8?q?=E8=B5=B0=E6=9F=A5=20P1-#3/#6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accounts/AccountManagementList.tsx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/web/src/components/accounts/AccountManagementList.tsx b/web/src/components/accounts/AccountManagementList.tsx index ad09396..b5c06ad 100644 --- a/web/src/components/accounts/AccountManagementList.tsx +++ b/web/src/components/accounts/AccountManagementList.tsx @@ -18,17 +18,15 @@ import { Typography, message, } from 'antd'; -import { PlusOutlined } from '@ant-design/icons'; +import { PlusOutlined, ReloadOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { remove, creatorUpdate, creatorGet } from '@/services/api'; import { conflictMessage, dateTime } from '@/utils/helpers'; -import { usePageActions } from '@/components/PageActions'; // 仅用 antd 默认组件:Table/Tag/Modal/Popconfirm/Select(tags)。 interface Row { id: string; name: string; - platform: string; platform_account_key: string; tags?: string[]; runtime_status?: string; @@ -117,7 +115,6 @@ export default function AccountManagementList() { ), }, - { title: '平台', dataIndex: 'platform', render: () => '抖音' }, { title: '作品数据', dataIndex: 'work_count', @@ -176,17 +173,17 @@ export default function AccountManagementList() { }, ]; - usePageActions( - , - ); - return ( {contextHolder} 共 {rows.length} 个自有账号 + + + {error ? ( 重试} /> From 96a4692c965ab0936c655651efec90758a2eebb1 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:22:18 +0800 Subject: [PATCH 04/12] =?UTF-8?q?refactor(ui):=20=E5=85=A8=E7=AB=99=20mess?= =?UTF-8?q?age.useMessage=20=E7=BB=9F=E4=B8=80=20App.useApp=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=20contextHolder=EF=BC=88=E8=B5=B0=E6=9F=A5?= =?UTF-8?q?=20P1-#4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accounts/AccountManagementList.tsx | 37 ++++------------ .../accounts/MonitoringAccountList.tsx | 29 ++----------- web/src/components/creator/WorksGallery.tsx | 29 +++---------- web/src/pages/accounts/$id/edit.tsx | 43 ++++--------------- web/src/pages/accounts/$id/index.tsx | 24 ++--------- web/src/pages/accounts/import.tsx | 38 ++++------------ .../pages/accounts/monitoring/$id/index.tsx | 22 ++-------- web/src/pages/browsers/$id/index.tsx | 2 +- web/src/pages/browsers/index.tsx | 26 ++++------- web/src/pages/browsers/new.tsx | 14 +++--- web/src/pages/creator/competitors/index.tsx | 18 +++----- web/src/pages/creator/settings/index.tsx | 17 +++----- web/src/pages/creator/workbench/index.tsx | 38 ++++++---------- web/src/pages/drafts/$id/index.tsx | 17 +------- web/src/pages/gateways/index.tsx | 14 +++--- web/src/pages/network-exits/index.tsx | 23 ++++------ web/src/pages/tasks/$id/index.tsx | 26 ++++------- 17 files changed, 106 insertions(+), 311 deletions(-) diff --git a/web/src/components/accounts/AccountManagementList.tsx b/web/src/components/accounts/AccountManagementList.tsx index b5c06ad..53dc346 100644 --- a/web/src/components/accounts/AccountManagementList.tsx +++ b/web/src/components/accounts/AccountManagementList.tsx @@ -3,21 +3,7 @@ // 数据走 GET /creator/accounts/monitor-views(画像 + 作品数/最近发布聚合),对齐竞品列表画像形态。 import { useCallback, useEffect, useState } from 'react'; import { history } from '@umijs/max'; -import { - Flex, - Alert, - Button, - Card, - Form, - Modal, - Popconfirm, - Select, - Space, - Table, - Tag, - Typography, - message, -} from 'antd'; +import { Alert, App, Button, Card, Flex, Form, Modal, Popconfirm, Select, Space, Table, Tag, Typography } from 'antd'; import { PlusOutlined, ReloadOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { remove, creatorUpdate, creatorGet } from '@/services/api'; @@ -43,7 +29,7 @@ export default function AccountManagementList() { const [tagForm] = Form.useForm<{ tags: string[] }>(); const [tagBusy, setTagBusy] = useState(false); const [actionBusy, setActionBusy] = useState(''); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const load = useCallback(async () => { setPending(true); @@ -54,8 +40,7 @@ export default function AccountManagementList() { (rows ?? []).map((account: any) => ({ ...account, name: account.name, - tags: account.tags ?? [], - })), + tags: account.tags ?? [] })), ); } catch (loadError) { setError(loadError); @@ -113,8 +98,7 @@ export default function AccountManagementList() { {account.platform_account_key} - ), - }, + ) }, { title: '作品数据', dataIndex: 'work_count', @@ -125,13 +109,11 @@ export default function AccountManagementList() { 最近发布 {account.latest_published_at ? dateTime(account.latest_published_at) : '—'} - ), - }, + ) }, { title: '标签', dataIndex: 'tags', - render: (tags?: string[]) => (tags?.length ? tags.map((tag) => {tag}) : 未设置), - }, + render: (tags?: string[]) => (tags?.length ? tags.map((tag) => {tag}) : 未设置) }, { title: '状态', dataIndex: 'status', @@ -142,8 +124,7 @@ export default function AccountManagementList() { {account.authorization_status === 'authorized' ? '已授权' : '已撤销'} - ), - }, + ) }, { title: '操作', key: 'actions', @@ -169,13 +150,11 @@ export default function AccountManagementList() { - ), - }, + ) }, ]; return ( - {contextHolder} 共 {rows.length} 个自有账号 diff --git a/web/src/components/accounts/MonitoringAccountList.tsx b/web/src/components/accounts/MonitoringAccountList.tsx index ebb4aa0..af31db6 100644 --- a/web/src/components/accounts/MonitoringAccountList.tsx +++ b/web/src/components/accounts/MonitoringAccountList.tsx @@ -2,25 +2,7 @@ // 展示作者头像与粉丝/关注/作品/最近发布等账号画像属性(migration 038 字段 + work 聚合)。 import { useCallback, useEffect, useState } from 'react'; import { history } from '@umijs/max'; -import { - Alert, - Avatar, - Button, - Card, - Descriptions, - Empty, - Flex, - Form, - Listy, - Modal, - Popconfirm, - Select, - Space, - Spin, - Tag, - Typography, - message, -} from 'antd'; +import { Alert, App, Avatar, Button, Card, Descriptions, Empty, Flex, Form, Listy, Modal, Popconfirm, Select, Space, Spin, Tag, Typography } from 'antd'; import { CloudUploadOutlined, ReloadOutlined } from '@ant-design/icons'; import { getList, remove, creatorAction, creatorUpdate } from '@/services/api'; import { conflictMessage, dateTime, platformLabel } from '@/utils/helpers'; @@ -50,8 +32,7 @@ const syncStatusMeta: Record = { running: { color: 'processing', label: '同步中' }, paused: { label: '已暂停' }, failed: { color: 'error', label: '同步失败' }, - blocked: { color: 'warning', label: '同步受阻' }, -}; + blocked: { color: 'warning', label: '同步受阻' } }; function formatCount(value?: number | null): string { if (value === null || value === undefined) return '—'; @@ -66,7 +47,7 @@ export default function MonitoringAccountList() { const [tagForm] = Form.useForm<{ tags: string[] }>(); const [tagBusy, setTagBusy] = useState(false); const [actionBusy, setActionBusy] = useState(''); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const load = useCallback(async () => { setPending(true); @@ -152,7 +133,6 @@ export default function MonitoringAccountList() { return ( - {contextHolder} 共 {rows.length} 个监控账号 @@ -232,8 +212,7 @@ export default function MonitoringAccountList() { {row.sync_error} ) : ( '—' - ), - }, + ) }, ]} /> diff --git a/web/src/components/creator/WorksGallery.tsx b/web/src/components/creator/WorksGallery.tsx index b6c885b..ff534e2 100644 --- a/web/src/components/creator/WorksGallery.tsx +++ b/web/src/components/creator/WorksGallery.tsx @@ -4,30 +4,14 @@ // 指标 GET /creator/works/:id/metrics,评论 GET /creator/comments?work_id=(定时采集由后端调度器维护)。 import { useCallback, useEffect, useMemo, useState } from 'react'; import { Line } from '@ant-design/charts'; -import { - Alert, - Button, - Card, - Col, - Drawer, - Empty, - Flex, - InputNumber, - Row, - Space, - Spin, - Table, - Typography, - message, -} from 'antd'; +import { Alert, App, Button, Card, Col, Drawer, Empty, Flex, InputNumber, Row, Space, Spin, Table, Typography } from 'antd'; import { CommentOutlined, EyeOutlined, FireOutlined, LikeOutlined, ReloadOutlined, - ShareAltOutlined, -} from '@ant-design/icons'; + ShareAltOutlined } from '@ant-design/icons'; import { creatorGet, getList } from '@/services/api'; import { conflictMessage, dateTime } from '@/utils/helpers'; @@ -49,8 +33,7 @@ function GrowthChart({ metrics }: { metrics: any[] }) { .map((series) => ({ time: dateTime(point.collected_at), metric: series.label, - value: point[series.key], - })), + value: point[series.key] })), ), [metrics], ); @@ -88,7 +71,7 @@ export default function WorksGallery({ sourceId, sourceType, emptyHint }: WorksG const [commentPage, setCommentPage] = useState(1); const [commentTotal, setCommentTotal] = useState(0); const [commentsPending, setCommentsPending] = useState(false); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const loadWorks = useCallback(async () => { setWorksPending(true); @@ -149,7 +132,6 @@ export default function WorksGallery({ sourceId, sourceType, emptyHint }: WorksG return ( <> - {contextHolder} v || '—' }, { title: '内容', dataIndex: 'content', ellipsis: true }, diff --git a/web/src/pages/accounts/$id/edit.tsx b/web/src/pages/accounts/$id/edit.tsx index af12abd..865376b 100644 --- a/web/src/pages/accounts/$id/edit.tsx +++ b/web/src/pages/accounts/$id/edit.tsx @@ -2,24 +2,7 @@ // 布局改用 antd Tabs(账号资料 / 自动响应策略)——归档版三区块信息量超过单页栅格,Tabs 是 antd 标准组织方式。 import { useCallback, useEffect, useState } from 'react'; import { history, useParams } from '@umijs/max'; -import { - Flex, - Alert, - Button, - Card, - Checkbox, - Descriptions, - Form, - Input, - InputNumber, - Popconfirm, - Select, - Space, - Tabs, - Tag, - Typography, - message, -} from 'antd'; +import { Alert, App, Button, Card, Checkbox, Descriptions, Flex, Form, Input, InputNumber, Popconfirm, Select, Space, Tabs, Tag, Typography } from 'antd'; import { creatorAction, creatorCreate, creatorGet, creatorRequest, creatorUpdate, getList } from '@/services/api'; import { conflictMessage, dateTime } from '@/utils/helpers'; @@ -41,8 +24,7 @@ function profileForm(profile: any) { note: profile.note || '', business_status: profile.business_status || 'normal', reply_requirements: profile.reply_requirements || '', - cooldown_seconds: profile.cooldown_seconds || 86400, - }; + cooldown_seconds: profile.cooldown_seconds || 86400 }; } export default function Page() { @@ -61,7 +43,7 @@ export default function Page() { const [relationError, setRelationError] = useState(null); const [listener, setListener] = useState(null); const [listenerError, setListenerError] = useState(null); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const selected = profiles.find((item) => item.id === selectedID); @@ -115,8 +97,7 @@ export default function Page() { try { const result = await creatorUpdate(`/creator/accounts/${encodeURIComponent(selected.id)}/profile`, { ...values, - cooldown_seconds: Number(values.cooldown_seconds), - }); + cooldown_seconds: Number(values.cooldown_seconds) }); setProfiles((items) => items.map((item) => (item.id === selected.id ? result : item))); form.setFieldsValue(profileForm(result)); messageApi.success('账号资料已保存。'); @@ -170,8 +151,7 @@ export default function Page() { setBusy(true); try { const result = await creatorAction(`/creator/accounts/${encodeURIComponent(selected.id)}/big-account`, { - enabled: !selected.big_account, - }); + enabled: !selected.big_account }); setProfiles((items) => items.map((item) => (item.id === selected.id ? result : item))); form.setFieldsValue(profileForm(result)); messageApi.success(result.big_account ? '已开启大号模式。' : '已关闭大号模式。'); @@ -192,13 +172,11 @@ export default function Page() { candidate_texts: String(values.candidate_texts || '') .split(',') .map((item: string) => item.trim()) - .filter(Boolean), - }; + .filter(Boolean) }; await creatorCreate('/creator/relations', { big_account_id: selected.id, small_account_id: values.execution_account_id, - enabled: true, - }); + enabled: true }); const result = editingStrategyID ? await creatorUpdate(`/creator/strategies/${encodeURIComponent(editingStrategyID)}`, payload) : await creatorCreate(`/creator/accounts/${encodeURIComponent(selected.id)}/strategies`, payload); @@ -235,8 +213,7 @@ export default function Page() { await creatorCreate('/creator/relations', { big_account_id: relation.big_account_id, small_account_id: relation.small_account_id, - enabled: false, - }); + enabled: false }); setRelations((items) => items.filter((item) => item.small_account_id !== relation.small_account_id)); messageApi.success('账号关系已解除;已有策略不会自动恢复。'); } catch (actionError) { @@ -451,8 +428,7 @@ export default function Page() { enabled: strategy.enabled, event_types: strategy.event_types || [], action: strategy.action, - candidate_texts: (strategy.candidate_texts || []).join(', '), - }); + candidate_texts: (strategy.candidate_texts || []).join(', ') }); }} disabled={busy} > @@ -479,7 +455,6 @@ export default function Page() { return (
- {contextHolder}
diff --git a/web/src/pages/accounts/$id/index.tsx b/web/src/pages/accounts/$id/index.tsx index c09cef6..977621f 100644 --- a/web/src/pages/accounts/$id/index.tsx +++ b/web/src/pages/accounts/$id/index.tsx @@ -6,20 +6,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { history, useParams } from '@umijs/max'; import { Line } from '@ant-design/charts'; -import { - Flex, - Alert, - Button, - Card, - Descriptions, - Form, - Input, - Modal, - Space, - Tag, - Typography, - message, -} from 'antd'; +import { Alert, App, Button, Card, Descriptions, Flex, Form, Input, Modal, Space, Tag, Typography } from 'antd'; import { accountAction, createDraft, getOne, getList, creatorGet, creatorAction } from '@/services/api'; import { accountReadiness, conflictMessage, dateTime, platformLabel } from '@/utils/helpers'; import { usePageActions, usePageInfo } from '@/components/PageActions'; @@ -31,8 +18,7 @@ const collectionStatusMeta: Record = succeeded: { color: 'success', label: '采集中' }, running: { color: 'processing', label: '采集运行中' }, failed: { color: 'error', label: '采集失败' }, - blocked: { color: 'warning', label: '采集受阻' }, -}; + blocked: { color: 'warning', label: '采集受阻' } }; // 粉丝趋势:把账号画像时序展开成长表(时间 × 指标 × 数值)供折线图渲染。 const accountSeriesMeta = [ @@ -56,8 +42,7 @@ function AccountTrendChart({ metrics }: { metrics: any[] }) { .map((series) => ({ time: dateTime(point.collected_at), metric: series.label, - value: point[series.key], - })), + value: point[series.key] })), ), [metrics], ); @@ -89,7 +74,7 @@ export default function Page() { const [draftBusy, setDraftBusy] = useState(false); const [collectionStatus, setCollectionStatus] = useState(null); const [accountMetrics, setAccountMetrics] = useState([]); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const readiness = account ? accountReadiness(account, binding, browsersError) : null; @@ -246,7 +231,6 @@ export default function Page() { return ( - {contextHolder} diff --git a/web/src/pages/accounts/import.tsx b/web/src/pages/accounts/import.tsx index 4f0459c..ecbe91c 100644 --- a/web/src/pages/accounts/import.tsx +++ b/web/src/pages/accounts/import.tsx @@ -1,21 +1,6 @@ // 账号导入:语义对齐 web.archived AccountImportPage(分享链接解析任务列表 + 新建导入任务 Modal)。 import { useCallback, useEffect, useState } from 'react'; -import { - Alert, - Avatar, - Button, - Card, - Flex, - Form, - Input, - Modal, - Select, - Space, - Table, - Tag, - Typography, - message, -} from 'antd'; +import { Alert, App, Avatar, Button, Card, Flex, Form, Input, Modal, Select, Space, Table, Tag, Typography } from 'antd'; import { PlusOutlined, ReloadOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { create, getList, creatorAction } from '@/services/api'; @@ -47,7 +32,7 @@ export default function Page() { const [form] = Form.useForm(); const [busy, setBusy] = useState(false); const [retryID, setRetryID] = useState(null); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const loadShareJobs = useCallback(async () => { setPending(true); @@ -90,8 +75,7 @@ export default function Page() { try { const variables: Record = { platform: sharePlatform, - share_url: extractedShareURL, - }; + share_url: extractedShareURL }; if (values.tags?.length) variables.tags = values.tags; await create('creator-competitor-share-jobs', variables); await loadShareJobs(); @@ -144,8 +128,7 @@ export default function Page() { ) : ( inner ); - }, - }, + } }, { title: '分享链接', dataIndex: 'share_url', @@ -157,8 +140,7 @@ export default function Page() { {dateTime(job.created_at)}
- ), - }, + ) }, { title: '平台', dataIndex: 'platform', render: (value?: string) => platformLabel(value) }, { title: '状态', @@ -166,14 +148,12 @@ export default function Page() { render: (value?: string) => { const status = shareJobStatus[value ?? ''] || { label: value || '未知', tone: 'default' as const }; return {status.label}; - }, - }, + } }, { title: '尝试次数', dataIndex: 'attempts', render: (value?: number) => {value ?? 0} / 3 }, { title: '失败原因', dataIndex: 'failure_reason', - render: (value?: string) => (value ? {value} : '—'), - }, + render: (value?: string) => (value ? {value} : '—') }, { title: '操作', key: 'actions', @@ -185,13 +165,11 @@ export default function Page() { ) : ( '—' - ), - }, + ) }, ]; return ( - {contextHolder} 共 {jobs.length} 个导入任务 diff --git a/web/src/pages/accounts/monitoring/$id/index.tsx b/web/src/pages/accounts/monitoring/$id/index.tsx index d25cadb..cdc9b24 100644 --- a/web/src/pages/accounts/monitoring/$id/index.tsx +++ b/web/src/pages/accounts/monitoring/$id/index.tsx @@ -4,18 +4,7 @@ // 作品列表走 GET /creator/works?source_id=&source_type=competitor,定时采集由后端调度器维护。 import { useCallback, useEffect, useState } from 'react'; import { history, useParams } from '@umijs/max'; -import { - Alert, - Avatar, - Button, - Card, - Descriptions, - Flex, - Space, - Tag, - Typography, - message, -} from 'antd'; +import { Alert, App, Avatar, Button, Card, Descriptions, Flex, Space, Tag, Typography } from 'antd'; import { creatorAction, getOne } from '@/services/api'; import { conflictMessage, dateTime, platformLabel } from '@/utils/helpers'; import { usePageActions, usePageInfo } from '@/components/PageActions'; @@ -45,8 +34,7 @@ const syncStatusMeta: Record = { running: { color: 'processing', label: '同步中' }, paused: { label: '已暂停' }, failed: { color: 'error', label: '同步失败' }, - blocked: { color: 'warning', label: '同步受阻' }, -}; + blocked: { color: 'warning', label: '同步受阻' } }; function formatCount(value?: number | null): string { if (value === null || value === undefined) return '—'; @@ -59,7 +47,7 @@ export default function Page() { const [pending, setPending] = useState(true); const [error, setError] = useState(null); const [actionBusy, setActionBusy] = useState(false); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const loadCompetitor = useCallback(async () => { setPending(true); @@ -150,7 +138,6 @@ export default function Page() { return ( - {contextHolder} {competitor.sync_error} ) : ( '—' - ), - }, + ) }, ]} /> diff --git a/web/src/pages/browsers/$id/index.tsx b/web/src/pages/browsers/$id/index.tsx index 8bb8c52..b721ce2 100644 --- a/web/src/pages/browsers/$id/index.tsx +++ b/web/src/pages/browsers/$id/index.tsx @@ -1,7 +1,7 @@ // 运行环境详情:语义对齐 web.archived BrowsersPage.jsx 的 BrowserDetail。 import { useEffect, useState } from 'react'; import { history, useParams } from '@umijs/max'; -import { Flex, Alert, App, Button, Card, Descriptions, Space, Tag, Typography } from 'antd'; +import { Alert, App, Button, Card, Descriptions, Flex, Space, Tag, Typography } from 'antd'; import { CopyOutlined } from '@ant-design/icons'; import { getOne } from '@/services/api'; diff --git a/web/src/pages/browsers/index.tsx b/web/src/pages/browsers/index.tsx index aa9ca9f..da12a0f 100644 --- a/web/src/pages/browsers/index.tsx +++ b/web/src/pages/browsers/index.tsx @@ -2,7 +2,7 @@ // 动作保持显式动词(start/stop/recycle),启停禁用条件与归档版一致。 import { useCallback, useEffect, useState } from 'react'; import { history } from '@umijs/max'; -import { Alert, Button, Card, Flex, Popconfirm, Space, Table, Tag, Typography, message } from 'antd'; +import { Alert, App, Button, Card, Flex, Popconfirm, Space, Table, Tag, Typography } from 'antd'; import { CopyOutlined, PlusOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { browserAction, getList } from '@/services/api'; @@ -17,8 +17,7 @@ const stateText: Record = { gateway_unreachable: '网关不可达', runtime_missing: '运行实例缺失', recorded: '已记录', - missing: '未部署', -}; + missing: '未部署' }; const blockText: Record = { account_revoked: '授权已撤销', account_paused: '账号已暂停', @@ -26,8 +25,7 @@ const blockText: Record = { network_exit_missing: '固定出口缺失', network_exit_unhealthy: '固定出口不健康', runtime_stop_pending: '停止结果待确认', - runtime_missing: '运行实例缺失', -}; + runtime_missing: '运行实例缺失' }; const scheduleBlock = (runtime: any) => runtime.schedule_status === 'ready' ? '' : blockText[runtime.schedule_block_reason] || runtime.schedule_block_reason || '不可调度'; @@ -37,7 +35,7 @@ export default function Page() { const [pending, setPending] = useState(true); const [error, setError] = useState(null); const [busy, setBusy] = useState(''); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const load = useCallback(async () => { setPending(true); @@ -83,8 +81,7 @@ export default function Page() { {runtime.alias} · seed {runtime.fingerprint?.seed}
- ), - }, + ) }, { title: '状态', dataIndex: 'state', @@ -93,8 +90,7 @@ export default function Page() { return ( {known ? stateText[state] : `未知状态:${state}`} ); - }, - }, + } }, { title: '固定绑定', dataIndex: 'account_id', @@ -109,8 +105,7 @@ export default function Page() { {block || '可调度'}
); - }, - }, + } }, { title: 'CDP', dataIndex: 'endpoint', @@ -124,8 +119,7 @@ export default function Page() {
) : ( — - ), - }, + ) }, { title: '操作', key: 'actions', @@ -155,13 +149,11 @@ export default function Page() {
); - }, - }, + } }, ]; return ( - {contextHolder} 共 {runtimes.length} 个运行环境 @@ -188,8 +185,7 @@ export default function Page() { ({ value: field, label: field }))} /> - ), - }, + ) }, ]} /> diff --git a/web/src/pages/creator/competitors/index.tsx b/web/src/pages/creator/competitors/index.tsx index b46d534..bff2fda 100644 --- a/web/src/pages/creator/competitors/index.tsx +++ b/web/src/pages/creator/competitors/index.tsx @@ -3,7 +3,7 @@ // 平台筛选已随 migration 038(platform 收敛 douyin)移除。 import { useEffect, useState } from 'react'; import { CommentOutlined, LikeOutlined, ShareAltOutlined } from '@ant-design/icons'; -import { Flex, Alert, Button, Card, Col, Drawer, Empty, Input, InputNumber, Modal, Row, Select, Space, Spin, Table, Tag, Typography, message } from 'antd'; +import { Alert, App, Button, Card, Col, Drawer, Empty, Flex, Input, InputNumber, Modal, Row, Select, Space, Spin, Table, Tag, Typography } from 'antd'; import { creatorAction, creatorGet, creatorUpdate, getList } from '@/services/api'; import { conflictMessage, dateTime } from '@/utils/helpers'; @@ -18,8 +18,7 @@ const publishedAtStatusMeta: Record = verified: { color: 'green', label: '已核验' }, future: { color: 'orange', label: '未来时间' }, pending_verification: { label: '待核验' }, - invalid: { color: 'red', label: '无效时间' }, -}; + invalid: { color: 'red', label: '无效时间' } }; interface Filters { minLikes?: number; @@ -55,7 +54,7 @@ export default function Page() { const [rewriteTitle, setRewriteTitle] = useState(''); const [rewriteScript, setRewriteScript] = useState(''); const [pendingSwitchWork, setPendingSwitchWork] = useState(null); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); async function load() { setPending(true); @@ -71,9 +70,7 @@ export default function Page() { min_shares: filters.minShares === undefined ? undefined : Number(filters.minShares), published_at_status: filters.publishedAtStatus, published_after: filters.publishedAfter ? `${filters.publishedAfter}T00:00:00Z` : undefined, - published_before: filters.publishedBefore ? `${filters.publishedBefore}T23:59:59Z` : undefined, - }, - }); + published_before: filters.publishedBefore ? `${filters.publishedBefore}T23:59:59Z` : undefined } }); setWorks(result.data); setWorkPageInfo({ total: result.total, hasNext: Boolean(result.hasNext) }); } catch (loadError) { @@ -163,8 +160,7 @@ export default function Page() { setMaterialPending(true); try { const result = await creatorAction(`/creator/works/${encodeURIComponent(material.work_id)}/material/rewrite/confirm`, { - requirement: rewriteRequirement, - }); + requirement: rewriteRequirement }); setMaterial(result); messageApi.info('已确认仿写要求,请在可编辑字段中复核并保存结果。'); } catch (actionError) { @@ -196,8 +192,7 @@ export default function Page() { try { const result = await creatorUpdate(`/creator/works/${encodeURIComponent(material.work_id)}/material/rewrite`, { title: rewriteTitle, - script: rewriteScript, - }); + script: rewriteScript }); setMaterial(result); messageApi.info('仿写标题和口播已保存,可继续人工复核。'); } catch (actionError) { @@ -215,7 +210,6 @@ export default function Page() { return ( <> - {contextHolder} 调整条件后自动刷新}> diff --git a/web/src/pages/creator/settings/index.tsx b/web/src/pages/creator/settings/index.tsx index a9e8cef..0495380 100644 --- a/web/src/pages/creator/settings/index.tsx +++ b/web/src/pages/creator/settings/index.tsx @@ -1,7 +1,7 @@ // 采集设置:语义对齐 web.archived CreatorSettingsPage.jsx(提交 d97cade)。 // 四类配置用 antd Tabs 组织;仅用 antd 默认组件。 import { useCallback, useEffect, useState } from 'react'; -import { Alert, Button, Card, Checkbox, Form, Input, InputNumber, Tabs, Typography, message } from 'antd'; +import { Alert, App, Button, Card, Checkbox, Form, Input, InputNumber, Tabs, Typography } from 'antd'; import { creatorGet, creatorUpdate } from '@/services/api'; import { conflictMessage } from '@/utils/helpers'; @@ -36,7 +36,7 @@ export default function Page() { const [pending, setPending] = useState(true); const [error, setError] = useState(null); const [busy, setBusy] = useState(false); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const load = useCallback(async () => { setPending(true); @@ -75,7 +75,6 @@ export default function Page() { return (
- {contextHolder} 按配置类别管理 UTC 采集窗口、指标采集和已批准的服务。
@@ -93,8 +92,7 @@ export default function Page() {
- ), - }, + ) }, { key: 'metrics', label: '指标采集', @@ -113,8 +111,7 @@ export default function Page() { - ), - }, + ) }, { key: 'ai', label: 'AI 服务', @@ -130,8 +127,7 @@ export default function Page() { 已完成 AI 配置审批 - ), - }, + ) }, { key: 'transcription', label: '转写服务', @@ -147,8 +143,7 @@ export default function Page() { 已完成转写配置审批 - ), - }, + ) }, ]} />
diff --git a/web/src/pages/creator/workbench/index.tsx b/web/src/pages/creator/workbench/index.tsx index 4140c06..9efd404 100644 --- a/web/src/pages/creator/workbench/index.tsx +++ b/web/src/pages/creator/workbench/index.tsx @@ -2,7 +2,7 @@ // 六个页签:评论/线索/规则/事件监听/私信/操作记录;实时更新走 /creator/updates SSE;仅用 antd 默认组件。 import { useEffect, useRef, useState } from 'react'; import type { ReactNode } from 'react'; -import { Flex, Alert, Button, Card, Checkbox, Col, Empty, Input, Modal, Row, Select, Space, Spin, Table, Tabs, Tag, Typography, message } from 'antd'; +import { Alert, App, Button, Card, Checkbox, Col, Empty, Flex, Input, Modal, Row, Select, Space, Spin, Table, Tabs, Tag, Typography } from 'antd'; import type { ColumnsType } from 'antd/es/table'; import { create, creatorAction, creatorCreate, creatorGet, creatorSubscribe, creatorSyncConversation, creatorUpdate, getList } from '@/services/api'; import { conflictMessage, dateTime } from '@/utils/helpers'; @@ -53,8 +53,7 @@ function operationStatus(state?: string, reason?: string): string { failed: '失败(平台明确拒绝或执行前失败)', blocked: '已阻止(未发送)', processing: '处理中(尚未获得最终结果)', - uncertain: '结果不明(禁止自动重试)', - }; + uncertain: '结果不明(禁止自动重试)' }; return `${labels[state || ''] || state || '未知状态'}${reason ? `:${reason}` : ''}`; } @@ -129,7 +128,7 @@ export default function Page() { const [pendingDMSwitch, setPendingDMSwitch] = useState<{ kind: 'account' | 'conversation'; id: string } | null>(null); const loadSequence = useRef(0); const messageSequence = useRef(0); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const visibleData = dataTab === tab ? data : []; const visibleConversations = conversationAccountID === dmAccountID ? conversations : []; @@ -245,8 +244,7 @@ export default function Page() { setMessages(items); setMessagePageInfo({ total: Array.isArray(result) ? items.length : (result.total ?? items.length), - hasNext: Array.isArray(result) ? false : Boolean(result.has_next), - }); + hasNext: Array.isArray(result) ? false : Boolean(result.has_next) }); }) .catch((loadError) => { if (sequence === messageSequence.current) setMessageError(loadError); @@ -378,8 +376,7 @@ export default function Page() { topic: ruleForm.topic, include_keywords: parseKeywords(ruleForm.include_keywords), exclude_keywords: parseKeywords(ruleForm.exclude_keywords), - ai_requirement: ruleForm.ai_requirement, - }; + ai_requirement: ruleForm.ai_requirement }; const result = editingRuleID ? await creatorUpdate(`/creator/rules/${encodeURIComponent(editingRuleID)}`, variables) : (await create('creator-rules', variables)).data; @@ -418,8 +415,7 @@ export default function Page() { text: draft?.text || '', target_uid: comment.author_uid || '', target_comment_id: comment.id, - operation_key: draft?.operation_key || '', - }); + operation_key: draft?.operation_key || '' }); messageApi.info(mode === 'dm' ? '请填写发送账号和私信文案,再进行逐次确认。' : '请填写发送账号和文案,再进行逐次确认。'); } @@ -448,8 +444,7 @@ export default function Page() { account_id: reply.account_id, target_uid: reply.target_uid, ...(replyMode === 'comment' ? { target_comment_id: reply.target_comment_id } : {}), - text: reply.text, - }); + text: reply.text }); const result = await creatorAction(`/creator/operations/${encodeURIComponent(created.id)}/execute`); messageApi[result.state === 'succeeded' ? 'success' : 'warning'](operationStatus(result.state, result.reason)); if (result.state === 'succeeded') { @@ -532,8 +527,7 @@ export default function Page() { platform: dmConfirm.platform, account_id: dmAccountID, target_uid: dmConfirm.peer_uid, - text: dmText, - }); + text: dmText }); const result = await creatorAction(`/creator/operations/${encodeURIComponent(created.id)}/execute`); messageApi[result.state === 'succeeded' ? 'success' : 'warning'](operationStatus(result.state, result.reason)); if (result.state === 'succeeded') { @@ -826,8 +820,7 @@ export default function Page() { topic: rule.topic, include_keywords: (rule.include_keywords || []).join(', '), exclude_keywords: (rule.exclude_keywords || []).join(', '), - ai_requirement: rule.ai_requirement, - }); + ai_requirement: rule.ai_requirement }); }} disabled={busy} > @@ -877,8 +870,7 @@ export default function Page() { padding: '8px 8px', textAlign: 'left', whiteSpace: 'normal', - background: conversation.id === conversationID ? '#e6f4ff' : undefined, - }} + background: conversation.id === conversationID ? '#e6f4ff' : undefined }} type={conversation.id === conversationID ? 'primary' : 'default'} ghost={conversation.id === conversationID} onClick={() => switchConversation(conversation.id)} @@ -935,8 +927,7 @@ export default function Page() { maxWidth: '80%', background: msg.direction === 'outbound' ? '#e6f4ff' : '#fafafa', borderRadius: 6, - padding: 12, - }} + padding: 12 }} > {msg.text || `[${msg.message_type}]`} @@ -992,8 +983,7 @@ export default function Page() { statusTag( item.state === 'succeeded' ? 'success' : item.state === 'uncertain' || item.state === 'processing' ? 'warning' : item.state === 'failed' ? 'error' : 'default', operationStatus(item.state, item.reason), - ), - }, + ) }, { title: '时间', dataIndex: 'created_at', render: (value: string) => {dateTime(value)} }, { title: '原因', dataIndex: 'reason', render: (value?: string) => {value || '—'} }, ]; @@ -1013,7 +1003,6 @@ export default function Page() { return ( - {contextHolder} { setPending(true); @@ -112,7 +100,6 @@ export default function Page() { return (
- {contextHolder}
{draft.account.platform_account_key} · 草稿版本 {draft.version} diff --git a/web/src/pages/gateways/index.tsx b/web/src/pages/gateways/index.tsx index 607c089..76297be 100644 --- a/web/src/pages/gateways/index.tsx +++ b/web/src/pages/gateways/index.tsx @@ -1,6 +1,6 @@ // 网关管理:语义对齐 web.archived GatewaysPage.jsx(注册/编辑 Modal、令牌显隐复制、删除)。 import { useCallback, useEffect, useState } from 'react'; -import { Alert, Button, Card, Flex, Form, Input, Modal, Popconfirm, Space, Table, Typography, message } from 'antd'; +import { Alert, App, Button, Card, Flex, Form, Input, Modal, Popconfirm, Space, Table, Typography } from 'antd'; import { CopyOutlined, EyeInvisibleOutlined, EyeOutlined, PlusOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { create, getList, remove, update } from '@/services/api'; @@ -15,8 +15,7 @@ function GatewayFormModal({ busy, error, onCancel, - onSubmit, -}: { + onSubmit }: { open: boolean; initial: any | null; busy: boolean; @@ -79,7 +78,7 @@ export default function Page() { const [editing, setEditing] = useState(null); const [busy, setBusy] = useState(''); const [created, setCreated] = useState(null); - const [messageApi, contextHolder] = message.useMessage(); + const { message: messageApi } = App.useApp(); const load = useCallback(async () => { setPending(true); @@ -148,8 +147,7 @@ export default function Page() { { title: '令牌', dataIndex: 'token', - render: (token: string, gateway) => , - }, + render: (token: string, gateway) => }, { title: '操作', key: 'actions', @@ -165,13 +163,11 @@ export default function Page() { - ), - }, + ) }, ]; return ( - {contextHolder} 共 {gateways.length} 个网关
- ), - }, + ) }, { title: '状态', dataIndex: 'health_status', render: (value?: string) => healthTag(value) }, { title: '用户名', dataIndex: 'username', render: (value?: string) => value || '无' }, { title: '密码', dataIndex: 'password', render: (value?: string) => value || '无' }, @@ -242,8 +238,7 @@ export default function Page() { {accountsByExit.get(exit.id)?.join('、') || '未绑定'} - ), - }, + ) }, { title: '操作', key: 'actions', @@ -273,13 +268,11 @@ export default function Page() { - ), - }, + ) }, ]; return ( - {contextHolder} 共 {exits.length} 个网络出口 - ), - }, + ) }, { key: 'execution', label: '执行关联', @@ -169,8 +164,7 @@ export default function Page() { ) : null} - ), - }, + ) }, { key: 'action', label: '唯一安全动作', @@ -217,13 +211,11 @@ export default function Page() { ) : null} {task.allowed_action ? null : 当前没有可安全执行的动作。} - ), - }, + ) }, ]; return ( - {contextHolder}
任务详情 From bb388112a7c31cdb3c57b20a5c6f95447bd0e595 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:22:51 +0800 Subject: [PATCH 05/12] =?UTF-8?q?fix(ui):=20metadata=20=E6=B8=85=E7=90=86?= =?UTF-8?q?=E6=97=A7=E8=B7=AF=E5=BE=84=20/competitors=20=E4=B8=8E=20gatewa?= =?UTF-8?q?ys=20=E8=AF=A6=E6=83=85=E6=AD=BB=E8=A7=84=E5=88=99=EF=BC=8C?= =?UTF-8?q?=E8=A1=A5=E7=AB=9E=E5=93=81=E8=B4=A6=E5=8F=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=A7=84=E5=88=99=EF=BC=88=E8=B5=B0=E6=9F=A5=20P1-#5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/utils/metadata.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/utils/metadata.tsx b/web/src/utils/metadata.tsx index 8607f8d..b5d5b08 100644 --- a/web/src/utils/metadata.tsx +++ b/web/src/utils/metadata.tsx @@ -26,7 +26,7 @@ const rules: Array<{ test: (path: string) => boolean; title: string; subtitle: s { test: (p) => p === '/creator/competitors', title: '竞品分析', subtitle: '查看竞品作品与指标,分享链接导入请前往账号导入。' }, { test: (p) => p === '/creator/workbench', title: '运营工作台', subtitle: '评论、线索、私信与写操作均保留来源和明确结果。' }, { test: (p) => p === '/creator/settings', title: '采集设置', subtitle: '统一配置采集窗口、指标采集和已批准的服务。' }, - { test: (p) => p === '/competitors' || p.startsWith('/competitors/'), title: '竞品分析', subtitle: '粘贴作品分享内容,自动识别作者并加入监听队列。' }, + { test: (p) => p.startsWith('/creator/competitors/'), title: '竞品账号详情', subtitle: '查看竞品画像与作品列表,点击作品可追溯指标统计。' }, { test: (p) => p.startsWith('/drafts/'), title: '草稿核对', subtitle: '核对版本化草稿,确认后再将操作加入队列。' }, { test: (p) => p.startsWith('/attempts/'), title: 'Attempt 详情', subtitle: '查看执行结果、运行环境与网络出口。' }, { test: (p) => p === '/tasks', title: '任务中心', subtitle: '逐条处理暂停、版本变化与未知执行结果。' }, @@ -37,7 +37,6 @@ const rules: Array<{ test: (path: string) => boolean; title: string; subtitle: s { test: (p) => p === '/network-exits', title: '网络出口', subtitle: '维护固定出口、健康观测与账号绑定。' }, { test: (p) => p.startsWith('/network-exits/'), title: '网络出口详情', subtitle: '查看出口配置、健康状态和绑定关系。' }, { test: (p) => p === '/gateways', title: '网关管理', subtitle: '注册并检查宿主机 native browser gateway。' }, - { test: (p) => p.startsWith('/gateways/'), title: '网关详情', subtitle: '查看网关连接信息和运行状态。' }, ]; // 菜单结构:工作台置顶(对标 pro 官方 workplace 预览),其余与 web.archived/src/app/Layout.jsx 一致(运营 / 资源 两组); From b9490a0c1cb8129870a530268aa75ff859bd6577 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:25:02 +0800 Subject: [PATCH 06/12] =?UTF-8?q?fix(ui):=20=E7=9B=91=E6=8E=A7=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=88=97=E8=A1=A8=E8=A1=8C=20hover=20=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=EF=BC=88=E4=B8=BB=E9=A2=98=20token=EF=BC=89=E3=80=81?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=90=8C=E6=AD=A5=E6=8C=89=E9=92=AE=20loadin?= =?UTF-8?q?g=EF=BC=88=E8=B5=B0=E6=9F=A5=20P2-#7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accounts/MonitoringAccountList.tsx | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/web/src/components/accounts/MonitoringAccountList.tsx b/web/src/components/accounts/MonitoringAccountList.tsx index af31db6..8c7bce3 100644 --- a/web/src/components/accounts/MonitoringAccountList.tsx +++ b/web/src/components/accounts/MonitoringAccountList.tsx @@ -2,11 +2,25 @@ // 展示作者头像与粉丝/关注/作品/最近发布等账号画像属性(migration 038 字段 + work 聚合)。 import { useCallback, useEffect, useState } from 'react'; import { history } from '@umijs/max'; -import { Alert, App, Avatar, Button, Card, Descriptions, Empty, Flex, Form, Listy, Modal, Popconfirm, Select, Space, Spin, Tag, Typography } from 'antd'; +import { Alert, App, Avatar, Button, Card, Descriptions, Empty, Flex, Form, Listy, Modal, Popconfirm, Select, Space, Spin, Tag, theme, Typography } from 'antd'; import { CloudUploadOutlined, ReloadOutlined } from '@ant-design/icons'; import { getList, remove, creatorAction, creatorUpdate } from '@/services/api'; import { conflictMessage, dateTime, platformLabel } from '@/utils/helpers'; +const useRowHoverStyle = () => { + const { token } = theme.useToken(); + return { + padding: 16, + borderBottom: `1px solid ${token.colorSplit}`, + borderRadius: token.borderRadiusLG, + cursor: 'pointer', + transition: 'background-color 0.2s', + ['@media (hover: hover)']: { + '&:hover': { backgroundColor: token.colorFillQuaternary }, + }, + } as const; +}; + interface CompetitorRow { id: string; platform: string; @@ -129,6 +143,8 @@ export default function MonitoringAccountList() { } } + const rowHoverStyle = useRowHoverStyle(); + const syncMeta = syncStatusMeta[tagTarget?.sync_status ?? ''] || { label: tagTarget?.sync_status || '—' }; return ( @@ -151,10 +167,7 @@ export default function MonitoringAccountList() { itemRender={(row) => { const meta = syncStatusMeta[row.sync_status ?? ''] || { label: row.sync_status || '—' }; return ( -
history.push(`/accounts/monitoring/${row.id}`)} - > +
history.push(`/accounts/monitoring/${row.id}`)}> @@ -178,7 +191,7 @@ export default function MonitoringAccountList() { - , - , ...(work.original_url ? [原文] : []), ]} @@ -306,65 +324,73 @@ export default function Page() { ) : null} + setMaterial(null)} + size="large" + title="素材处理" + destroyOnHidden + > {material ? ( - - 每一步都保留真实状态;失败不会被显示为成功。 - -
- -
- - {stepTag(material.download_status, `下载:${material.download_status}`)} - {stepTag(material.audio_status, `音轨:${material.audio_status}`)} - {stepTag(material.transcription_status, `转写:${material.transcription_status}`)} - - {material.failure_reason ? ( - - ) : null} -
- 仿写要求 - 必须先确认要求,才允许保存可编辑结果。 - setRewriteRequirement(event.target.value)} - disabled={Boolean(material.rewrite_confirmed_at) || materialPending} - /> -
- {material.rewrite_confirmed_at ? ( - <> - - - 生成结果不会自动发布,保存前必须人工复核。 - -
- 可编辑标题 - setRewriteTitle(event.target.value)} style={{ marginTop: 4 }} /> -
-
- 可编辑口播 - setRewriteScript(event.target.value)} style={{ marginTop: 4 }} /> -
-
- -
- - ) : ( -
- -
- )} -
-
+ + 每一步都保留真实状态;失败不会被显示为成功。 + +
+ +
+ + {stepTag(material.download_status, `下载:${material.download_status}`)} + {stepTag(material.audio_status, `音轨:${material.audio_status}`)} + {stepTag(material.transcription_status, `转写:${material.transcription_status}`)} + + {material.failure_reason ? ( + + ) : null} +
+ 仿写要求 + 必须先确认要求,才允许保存可编辑结果。 + setRewriteRequirement(event.target.value)} + disabled={Boolean(material.rewrite_confirmed_at) || materialPending} + /> +
+ {material.rewrite_confirmed_at ? ( + <> + + + 生成结果不会自动发布,保存前必须人工复核。 + +
+ 可编辑标题 + setRewriteTitle(event.target.value)} style={{ marginTop: 4 }} /> +
+
+ 可编辑口播 + setRewriteScript(event.target.value)} style={{ marginTop: 4 }} /> +
+
+ +
+ + ) : ( +
+ +
+ )} +
+
) : null} +
setWorkDetail(null)} size="large" title="作品详情"> {workDetail ? ( From 5acc89edf4f464b495bfa40b6d396973b13bf754 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 28 Sep 2026 07:37:13 +0800 Subject: [PATCH 12/12] =?UTF-8?q?fix(ui):=20=E6=88=91=E7=9A=84=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=93=8D=E4=BD=9C=E5=88=97=E5=8E=BB=E6=8E=89=E4=B8=8E?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=90=8D=E9=87=8D=E5=A4=8D=E7=9A=84=E3=80=8C?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=B4=A6=E5=8F=B7=E3=80=8D=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=88=E8=B5=B0=E6=9F=A5=20P2-#10=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/accounts/AccountManagementList.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/web/src/components/accounts/AccountManagementList.tsx b/web/src/components/accounts/AccountManagementList.tsx index 53dc346..ffda90a 100644 --- a/web/src/components/accounts/AccountManagementList.tsx +++ b/web/src/components/accounts/AccountManagementList.tsx @@ -137,9 +137,6 @@ export default function AccountManagementList() { - deleteAccount(account)}