Files
Nexus/docs/changelog/2026-06-07-push-target-path-default.md
T
Nexus Agent a225b655d9 feat(frontend): 恢复服务器批量检测路径并修复推送目标路径
补回 SPA 迁移丢失的 detect-path 确认框与结果弹窗,推送页留空走各机 target_path,文件页默认 50 条/页。
2026-06-08 00:56:35 +08:00

1.6 KiB
Raw Blame History

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.tsPushServerItem.target_path

迁移 / 重启

无。仅前端构建部署。

验证

cd frontend && npm run build
# 服务器页:列表见目标路径列;编辑保存后刷新可见
# 推送页:目标路径留空 + 选中已配置服务器 → 预览/推送成功
# 推送页:填写 /other/path → 覆盖所有选中机
# 批量选中 → 「检测目标路径」调用 detect-path