feat(ui): 新窗口打开落地即进文件树,调换行内按钮顺序

- 行内按钮改为删除在最右、新窗口在它左边(误触删除的概率更低)
- 会话行新窗口链接带 files=1,打开会话后把侧栏切到文件树,省一次点击
- 手机端本来就不显示行内按钮(hover:hover + pointer:fine),窄屏 setDrawerPane 也会拒绝切文件树
This commit is contained in:
2026-11-13 09:25:22 +08:00
parent e50015cdc1
commit 65d05d2656
3 changed files with 17 additions and 5 deletions
+9 -2
View File
@@ -2087,6 +2087,13 @@
// 会话深链 /?s=<session_id>:数据页面(/app/{task_id}/...)的「返回会话」FAB 用——
// task_id 即会话 id(engine 里 1:1)。地址栏常驻 ?s= 不抹掉,刷新/收藏/分享都能回到同一会话;
// 会话已删时 openSession 会自己回落到 welcome 并把 URL 清回 /。
const deep = new URLSearchParams(location.search).get('s');
if (deep) openSession(deep);
const params = new URLSearchParams(location.search);
const deep = params.get('s');
if (deep) {
openSession(deep).then(() => {
// 从侧栏「在新窗口打开」进来(带 files=1):开局直接把侧栏切到文件树;
// 窄屏/无会话/文件树未加载时 setDrawerPane 内部会自行忽略
if (params.get('files') === '1' && typeof setDrawerPane === 'function') setDrawerPane(true);
});
}
})();