Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/15840

Vanessaa99a55b512ae
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 1520580ed3..acefac5a14 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -987,9 +987,12 @@ data-type="navigation-root" data-path="/">
}
if (sourceElement.parentElement.childElementCount === 1) {
if (sourceElement.parentElement.previousElementSibling) {
- sourceElement.parentElement.previousElementSibling.querySelector(".b3-list-item__toggle").classList.add("fn__hidden");
- sourceElement.parentElement.previousElementSibling.querySelector(".b3-list-item__arrow").classList.remove("b3-list-item__arrow--open");
- const emojiElement = sourceElement.parentElement.previousElementSibling.querySelector(".b3-list-item__icon");
+ const parentLiElement = sourceElement.parentElement.previousElementSibling;
+ if (parentLiElement.getAttribute("data-type") !== "navigation-root") {
+ parentLiElement.querySelector(".b3-list-item__toggle").classList.add("fn__hidden");
+ }
+ parentLiElement.querySelector(".b3-list-item__arrow").classList.remove("b3-list-item__arrow--open");
+ const emojiElement = parentLiElement.querySelector(".b3-list-item__icon");
if (emojiElement.innerHTML === unicode2Emoji(window.siyuan.storage[Constants.LOCAL_IMAGES].folder)) {
emojiElement.innerHTML = unicode2Emoji(window.siyuan.storage[Constants.LOCAL_IMAGES].file);
}