Files
biliup-next/frontend/README.md

72 lines
1.4 KiB
Markdown
Raw Permalink 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/
```
旧控制台回退入口:
```text
http://127.0.0.1:8787/classic
```
## 当前状态
- React 控制台已接管默认首页
- 任务页已支持 `session context / bind full video / session merge / session rebind`
- 高频任务操作已改为局部刷新
- 旧原生控制台仍保留作回退路径