Files
biliup-next/frontend/README.md
2026-04-01 00:44:58 +08:00

66 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Frontend
`frontend/` 是新的 React + Vite 控制台迁移骨架,目标是逐步替换当前 `src/biliup_next/app/static/` 下的原生前端。
当前已迁入:
- 基础导航:`Overview / Tasks / Settings / Logs`
- `Overview` 第一版
- `Tasks` 工作台第一版
- `Logs` 工作台第一版
- 任务表
- 任务详情
- 与现有 Python API 的直连
## 目录
- `src/App.jsx`
- `src/components/`
- `src/api/client.js`
- `src/lib/format.js`
- `src/styles.css`
## 启动
当前机器未安装 `npm``corepack`,所以这套前端骨架还没有在本机完成依赖安装。
有包管理器后,在 `frontend/` 下执行:
```bash
npm install
npm run dev
```
开发服务器默认地址:
```text
http://127.0.0.1:5173/ui/
```
默认会通过 `vite.config.mjs` 把这些路径代理到现有后端 `http://127.0.0.1:8787`
- `/health`
- `/doctor`
- `/tasks`
- `/settings`
- `/runtime`
- `/history`
- `/logs`
- `/modules`
- `/scheduler`
- `/worker`
- `/stage`
生产构建完成后,把输出放到 `frontend/dist/`,当前 Python API 会自动在以下地址托管它:
```text
http://127.0.0.1:8787/ui/
```
## 下一步
- 迁移 `Settings`
- 将任务表改为真正服务端驱动的分页/排序/筛选
- 增加 React 路由和查询缓存
- 最终替换当前 `src/biliup_next/app/static/` 入口