From 83cf9eab94c58d2f9fc476d868d5413425fab54f Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Fri, 29 May 2026 23:32:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A1=B9=E7=9B=AE=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=88=97=E4=BC=98=E5=8C=96=20=E2=80=94=20=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E5=88=97=E5=8F=AF=E8=A7=81=E3=80=81=E6=A0=87=E9=A2=98=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E3=80=81=E6=93=8D=E4=BD=9C=E5=88=97=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/user/usage.md | 2 +- .../projects/components/ProjectTable.tsx | 20 +++++++++---------- .../projects/components/ProjectToolbar.tsx | 2 +- src/web/pages/projects/index.tsx | 1 + tests/web/routes/projects.test.tsx | 11 +++++----- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/user/usage.md b/docs/user/usage.md index 9c4f4fe..632b336 100644 --- a/docs/user/usage.md +++ b/docs/user/usage.md @@ -46,7 +46,7 @@ bun run dev config.yaml - **Admin(管理台)**:全局管理视角,包含总览和项目管理。默认入口,访问 `/` 即可进入。 - **Workbench(工作台)**:项目维度视角,通过 `/workbench/:projectId` 进入指定项目的工作台。URL 可保存为浏览器书签,下次直接进入。仅 active 状态的项目可进入工作台,archived 项目不可访问。 -从项目管理页面的 active 项目行可点击"进入工作台"跳转到对应项目的工作台。 +从项目管理页面的 active 项目行可点击"工作台"跳转到对应项目的工作台。 ## 模型管理 diff --git a/src/web/pages/projects/components/ProjectTable.tsx b/src/web/pages/projects/components/ProjectTable.tsx index fb559d6..60ea429 100644 --- a/src/web/pages/projects/components/ProjectTable.tsx +++ b/src/web/pages/projects/components/ProjectTable.tsx @@ -4,7 +4,7 @@ import { DeleteOutlined, EditOutlined, InboxOutlined, LoginOutlined, RedoOutline import { App as AntApp, Button, Popconfirm, Space, Table, Tag } from "antd"; import { useNavigate } from "react-router"; -import type { Project, ProjectListResponse } from "../../../../shared/api"; +import type { Project, ProjectListResponse, ProjectStatus } from "../../../../shared/api"; interface ProjectTableProps { data: ProjectListResponse | undefined; @@ -16,11 +16,12 @@ interface ProjectTableProps { onRestore: (id: string) => Promise; page: number; pageSize: number; + status: ProjectStatus; } const COLUMNS: ColumnsType = [ - { dataIndex: "name", ellipsis: true, title: "项目名称", width: 160 }, - { dataIndex: "description", ellipsis: true, title: "项目描述" }, + { dataIndex: "name", ellipsis: true, title: "名称", width: 140 }, + { dataIndex: "description", ellipsis: true, title: "描述" }, { align: "center", dataIndex: "status", @@ -31,21 +32,21 @@ const COLUMNS: ColumnsType = [ return 进行中; }, title: "状态", - width: 100, + width: 90, }, { align: "center", dataIndex: "createdAt", render: (_value, record: Project) => formatDatetime(record.createdAt), title: "创建时间", - width: 185, + width: 180, }, { align: "center", dataIndex: "updatedAt", render: (_value, record: Project) => formatDatetime(record.updatedAt), title: "更新时间", - width: 185, + width: 180, }, ]; @@ -59,6 +60,7 @@ export function ProjectTable({ onRestore, page, pageSize, + status, }: ProjectTableProps) { const { message } = AntApp.useApp(); const navigate = useNavigate(); @@ -92,7 +94,6 @@ export function ProjectTable({ const operationColumn: ColumnsType[number] = { dataIndex: "op", - fixed: "right", render: (_value, record: Project) => { if (record.status === "active") { return ( @@ -103,7 +104,7 @@ export function ProjectTable({ size="small" type="link" > - 进入工作台 + 工作台