diff --git a/AGENTS.md b/AGENTS.md index fecf015..dd2c110 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -56,9 +56,8 @@ Seg_Server/ ├── package.json # npm 依赖与脚本 ├── .env.example # AI Studio/Gemini 前端环境变量模板 ├── metadata.json # AI Studio 元数据 -├── logo_square.png # 登录页、Sidebar 与 favicon 使用的根目录方形 Logo ├── public/ -│ └── logo.png # 旧版保留 Logo 静态资源 +│ └── logo.png # 登录页、Sidebar 与 favicon 使用的 Logo ├── doc/ # 当前实现审计、接口契约和后续实施文档 ├── start_services.sh # 本地一键启动 PostgreSQL/Redis/MinIO/FastAPI/Celery/前端 ├── restart_dev_services.sh # 本地开发重启脚本;重启 FastAPI/Celery/前端并检查 3000/8000 diff --git a/README.md b/README.md index ac99e81..1114b56 100644 --- a/README.md +++ b/README.md @@ -139,9 +139,8 @@ Seg_Server/ ├── uploads/ # 临时上传目录 ├── frames/ # 临时帧目录 ├── doc/ # 当前实现审计、接口契约与后续实施文档 -├── logo_square.png # 侧边栏与 favicon 使用的根目录方形 Logo ├── public/ -│ └── logo.png # 旧版保留 Logo 静态资源 +│ └── logo.png # 登录页、侧边栏与 favicon 使用的 Logo ├── start_services.sh # 一键启动所有服务脚本 ├── server.ts # Express + Vite 前端入口(不再提供旧版 mock API) ├── index.html # SPA HTML 入口 diff --git a/doc/03-frontend-element-audit.md b/doc/03-frontend-element-audit.md index d3fbaf9..84ac6c0 100644 --- a/doc/03-frontend-element-audit.md +++ b/doc/03-frontend-element-audit.md @@ -13,7 +13,7 @@ |------|------|------|------| | 登录拦截 | `App.tsx` | 真实可用 | 未登录显示 `Login`,登录后显示主界面 | | 模块切换 | `Sidebar.tsx` + `App.tsx` | 真实可用 | 切换 `dashboard/projects/workspace/ai/templates`;“AI智能分割”入口使用 Bot + Sparkles 组合图标,强化 AI 语义 | -| Logo | `Login.tsx` / `Sidebar.tsx` | 真实可用 | 登录页和侧边栏都使用根目录 `logo_square.png`;favicon 使用 `/logo_square.png`,前端服务会从项目根目录提供该文件 | +| Logo | `Login.tsx` / `Sidebar.tsx` | 真实可用 | 登录页、侧边栏和 favicon 都使用 `public/logo.png`,运行时访问路径为 `/logo.png` | | GPU 状态圆标 | `Sidebar.tsx` | 真实可用 | 通过 `GET /api/ai/models/status` 显示 GPU/CPU 和当前模型可用性 | ## 登录页 diff --git a/doc/08-current-design-freeze.md b/doc/08-current-design-freeze.md index 0b1547a..026a48f 100644 --- a/doc/08-current-design-freeze.md +++ b/doc/08-current-design-freeze.md @@ -24,7 +24,7 @@ | 配置 | `src/lib/config.ts` | 推导 API 和 WebSocket 地址 | | WebSocket | `src/lib/websocket.ts` | 进度流连接、订阅、连接状态通知、心跳和重连 | | 模型状态 | `src/components/ModelStatusBadge.tsx` | 展示 GPU 与当前 SAM 模型真实可用状态;左侧 Sidebar 底部使用 compact 形态显示 GPU/CPU 状态,工作区顶栏不再重复显示,具体传播权重只在进入自动传播后由顶栏下拉负责 | -| 登录页 | `src/components/Login.tsx` | 使用根目录 `logo_square.png` 和系统标题文案,调用登录 API,写入 store | +| 登录页 | `src/components/Login.tsx` | 使用 `public/logo.png` 和系统标题文案,调用登录 API,写入 store | | Dashboard | `src/components/Dashboard.tsx` | 展示统计、任务控制、失败详情和 WebSocket 进度消息 | | 项目库 | `src/components/ProjectLibrary.tsx` | 项目列表、新建、重命名、删除、导入视频/DICOM、显式生成帧 | | 工作区 | `src/components/VideoWorkspace.tsx` | 加载帧和模板,组织工具栏、Canvas、本体面板、时间轴 | diff --git a/index.html b/index.html index ee1b458..bdfbcf3 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + 语义分割系统 SegServer diff --git a/logo_square.png b/logo_square.png deleted file mode 100644 index 6b9ee7e..0000000 Binary files a/logo_square.png and /dev/null differ diff --git a/server.ts b/server.ts index 6016ecf..b0afc05 100644 --- a/server.ts +++ b/server.ts @@ -7,9 +7,6 @@ async function startServer() { const PORT = 3000; app.use(express.json()); - app.get("/logo_square.png", (_req, res) => { - res.sendFile(path.join(process.cwd(), "logo_square.png")); - }); // Vite middleware for development if (process.env.NODE_ENV !== "production") { diff --git a/src/components/Login.test.tsx b/src/components/Login.test.tsx index 94f2d46..0290c58 100644 --- a/src/components/Login.test.tsx +++ b/src/components/Login.test.tsx @@ -55,7 +55,7 @@ describe('Login', () => { it('uses the product logo and updated system title copy', () => { render(); - expect(screen.getByAltText('Logo')).toHaveAttribute('src', expect.stringContaining('logo_square')); + expect(screen.getByAltText('Logo')).toHaveAttribute('src', expect.stringContaining('logo.png')); expect(screen.getByText('多模态影像及视频智能语义分割与标注系统')).toBeInTheDocument(); expect(screen.getByText('智能语义分割系统')).toBeInTheDocument(); expect(screen.queryByText('欢迎登录协同工作站')).not.toBeInTheDocument(); diff --git a/src/components/Login.tsx b/src/components/Login.tsx index 7d0fe94..8be27d3 100644 --- a/src/components/Login.tsx +++ b/src/components/Login.tsx @@ -33,7 +33,7 @@ export function Login() {
- Logo + Logo

多模态影像及视频智能语义分割与标注系统

智能语义分割系统

diff --git a/src/components/Sidebar.test.tsx b/src/components/Sidebar.test.tsx index c743030..c271057 100644 --- a/src/components/Sidebar.test.tsx +++ b/src/components/Sidebar.test.tsx @@ -41,10 +41,10 @@ describe('Sidebar', () => { expect(screen.getByTitle('AI智能分割').querySelector('[data-testid="ai-segmentation-icon"]')).toBeInTheDocument(); }); - it('uses the root logo_square asset for the sidebar logo', () => { + it('uses the public logo asset for the sidebar logo', () => { render(); - expect(screen.getByAltText('Logo')).toHaveAttribute('src', expect.stringContaining('logo_square')); + expect(screen.getByAltText('Logo')).toHaveAttribute('src', expect.stringContaining('logo.png')); }); it('uses a logout icon and prevents the logout tooltip from catching workspace hover', () => { diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index b818bcc..e700bfb 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -26,7 +26,7 @@ export function Sidebar({ activeModule, setActiveModule }: SidebarProps) { return (