fix: 侧边栏始终可见,不因无文件而隐藏

侧边栏包含「打开文件夹」入口,隐藏会导致用户无法打开文件夹
This commit is contained in:
thzxx
2026-05-21 12:59:53 +08:00
parent 2d899cca7e
commit 04c904dc20
-7
View File
@@ -547,13 +547,6 @@
// No folder open: manage independent files section
if (!currentRootPath) {
if (tabs.length === 0) {
// No tabs and no folder — hide sidebar
sidebar.classList.add('collapsed');
sidebarTree.innerHTML = '';
return;
}
sidebar.classList.remove('collapsed');
sidebarTree.innerHTML = '';
const indepSection = renderIndependentFiles();
if (indepSection) sidebarTree.appendChild(indepSection);