An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Show notebook change icon action only when needed https://github.com/siyuan-note/siyuan/issues/18417
Danielccf8d2ba378d
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.tsindex 1d79b1bf22..84c1293cf1 100644--- a/app/src/menus/navigation.ts+++ b/app/src/menus/navigation.ts@@ -242,24 +242,31 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {}/// #endifif (!window.siyuan.config.readonly) {- window.siyuan.menus.menu.append(new MenuItem({- id: "changeIcon",- label: window.siyuan.languages.changeIcon,- icon: "iconEmoji",- click: () => {- const iconElement = liElement.querySelector<HTMLElement>(".b3-list-item__icon");- if (!iconElement) {- return;+ let showChangeIcon = true;+ /// #if !MOBILE+ showChangeIcon = window.siyuan.config.fileTree.docIconClickExpand &&+ !window.siyuan.config.fileTree.boxDocEnabled;+ /// #endif+ if (showChangeIcon) {+ window.siyuan.menus.menu.append(new MenuItem({+ id: "changeIcon",+ label: window.siyuan.languages.changeIcon,+ icon: "iconEmoji",+ click: () => {+ const iconElement = liElement.querySelector<HTMLElement>(".b3-list-item__icon");+ if (!iconElement) {+ return;+ }+ const rect = iconElement.getBoundingClientRect();+ openEmojiPanel(notebookId, "notebook", {+ x: rect.left,+ y: rect.bottom,+ h: rect.height,+ w: rect.width,+ }, undefined, iconElement.querySelector<HTMLElement>("img"));}- const rect = iconElement.getBoundingClientRect();- openEmojiPanel(notebookId, "notebook", {- x: rect.left,- y: rect.bottom,- h: rect.height,- w: rect.width,- }, undefined, iconElement.querySelector<HTMLElement>("img"));- }- }).element);+ }).element);+ }window.siyuan.menus.menu.append(renameMenu({path: "/",notebookId,