fix: 侧边栏高亮跟随标签切换同步更新,支持显示独立打开的文件

- 添加 updateSidebarHighlight() 函数,标签切换时只更新高亮状态而非重建整棵树
- 给树节点添加 data-path 属性用于精确定位高亮
- 新增「已打开的文件」区域,显示不在当前文件夹内的独立文件
- 独立文件支持点击切换、修改状态标识、活跃高亮
- 无文件夹打开时自动显示独立文件列表,全部关闭后隐藏侧边栏
This commit is contained in:
thzxx
2026-05-21 12:56:50 +08:00
parent 65383defd1
commit eff04606bd
2 changed files with 132 additions and 1 deletions
+22
View File
@@ -860,6 +860,28 @@ html, body {
text-overflow: ellipsis;
}
/* ===== Independent Files Section ===== */
.independent-files-section {
border-bottom: 1px solid var(--border);
margin-bottom: 4px;
padding-bottom: 4px;
}
.independent-files-header {
font-size: 11px;
font-weight: 600;
color: var(--text-tertiary);
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 8px 12px 4px 12px;
}
.independent-file-item .independent-modified-dot {
color: var(--primary);
font-size: 14px;
margin-left: 4px;
}
/* ===== Search & Replace Bar ===== */
#search-bar {
background: var(--search-bg);