diff --git a/apps/web_v1/scripts/structure-check.mjs b/apps/web_v1/scripts/structure-check.mjs index daddacc..0d6b791 100644 --- a/apps/web_v1/scripts/structure-check.mjs +++ b/apps/web_v1/scripts/structure-check.mjs @@ -136,8 +136,12 @@ for (const required of ['status-online-dot', 'status-upgrade', 'status-system', if (!statusbarSource.includes(required)) failures.push(`project statusbar must restore ${required}`) } +const newChannelSource = readFileSync('src/pages/projects/project-new-channel.tsx', 'utf8') +for (const required of ['保存频道', '频道名称', '频道类型', '链接地址', '创建后可接入的内容']) { + if (!newChannelSource.includes(required)) failures.push(`new channel page must restore ${required}`) +} + const unsupportedControls = [ - { file: 'src/pages/projects/project-new-channel.tsx', required: '暂未开放', forbidden: ['保存频道', ' button.textContent?.includes('保存频道')), } }, channel)) } @@ -403,6 +405,9 @@ for (const check of channelPageChecks) { if (!check.activeChannel.includes(check.label)) { failures.push(`expected ${check.label} sidebar button to stay active, got ${JSON.stringify(check.activeChannel)}`) } + if (check.label === '新建频道' && (check.inputCount < 4 || !check.hasSaveChannel)) { + failures.push(`expected legacy new channel editor, got inputs=${check.inputCount}, save=${check.hasSaveChannel}`) + } } if (failures.length) { diff --git a/apps/web_v1/src/pages/projects/project-new-channel.tsx b/apps/web_v1/src/pages/projects/project-new-channel.tsx index 8cb4215..f049dfe 100644 --- a/apps/web_v1/src/pages/projects/project-new-channel.tsx +++ b/apps/web_v1/src/pages/projects/project-new-channel.tsx @@ -1,7 +1,9 @@ -import { Card, Empty, Typography } from '@arco-design/web-react' +import { Button, Card, Input, Select, Space, Tag, Typography } from '@arco-design/web-react' +import { IconApps, IconLink, IconPlus } from '@arco-design/web-react/icon' import type { ProjectWorkspace } from './project-types' const { Title, Text } = Typography +const { TextArea } = Input export function ProjectNewChannel({ activeWorkspace }: { activeWorkspace: ProjectWorkspace }) { return ( @@ -9,11 +11,51 @@ export function ProjectNewChannel({ activeWorkspace }: { activeWorkspace: Projec