feat(ui): 文件树在回合结束/回前台/重连后自动刷新
- 新增 reloadFileTree():保留展开与勾选,只重拉已展开的目录;250ms debounce + 1s 去重,多路触发合并 - 一轮跑完(engine 循环退出才发的 done)就地刷新;回前台 visibilitychange 与窗口重新聚焦也刷;断线重连补拉后补一次 - 修掉「切回文件树面板仍用旧缓存」:showFileTree 先失效再渲染 - 上传后改用 reloadFileTree,不再把用户已展开的目录收起来
This commit is contained in:
@@ -910,8 +910,9 @@
|
||||
// 全部成功不再弹提示(卡片已完成态即反馈);有失败才提醒
|
||||
if (errCount) toast('已上传 ' + done + ' 个,失败 ' + errCount + ' 个');
|
||||
loadFiles();
|
||||
// 桌面端左栏文件树是新的浏览入口,上传后要同步(旧面板只在手机端用)
|
||||
if (typeof window.refreshFileTree === 'function') window.refreshFileTree();
|
||||
// 桌面端左栏文件树是新的浏览入口,上传后要同步(旧面板只在手机端用);
|
||||
// 用 reloadFileTree 保留展开与勾选,refreshFileTree 会把用户展开的目录全收起来
|
||||
if (typeof window.reloadFileTree === 'function') window.reloadFileTree();
|
||||
// 1.2s 后收起进度条(还有别的批次在传就不收)
|
||||
setTimeout(() => {
|
||||
if (uploadBatches.size) return;
|
||||
|
||||
Reference in New Issue
Block a user