1.6 KiB
1.6 KiB
2026-06-07 推送页目标路径默认值与 per-server 回退
摘要
修复推送页无法使用「服务器管理」中各机 target_path 的问题;列表增加目标路径列与批量检测。
动机
- 设计与后端均支持:推送页 留空 → 按每台
servers.target_path;填写 → 统一覆盖 - 此前误将推送页默认设为
/www/wwwroot,导致列表里配置的路径被全局覆盖、形同无效 - 服务器列表无目标路径列,无法核对配置;后端已有
POST /servers/batch/detect-path但前端无入口
涉及文件
frontend/src/composables/push/usePushForm.ts— 默认留空,effectiveTargetPath(),留空校验frontend/src/composables/push/usePushProgress.ts/usePushPreview.ts— API 传effectiveTargetPath()frontend/src/components/push/PushToolbar.vue— hint 说明留空/覆盖语义frontend/src/components/push/PushServerGrid.vue— 展示各机路径(含「未配置」)frontend/src/pages/ServersPage.vue— 列表列、详情面板、批量「检测目标路径」(见 2026-06-07-servers-batch-detect-path-restore.md)frontend/src/composables/push/types.ts—PushServerItem.target_path
迁移 / 重启
无。仅前端构建部署。
验证
cd frontend && npm run build
# 服务器页:列表见目标路径列;编辑保存后刷新可见
# 推送页:目标路径留空 + 选中已配置服务器 → 预览/推送成功
# 推送页:填写 /other/path → 覆盖所有选中机
# 批量选中 → 「检测目标路径」调用 detect-path