Skip to content

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

:bug: Prevent dynamic status content from appearing as menu icons https://github.com/siyuan-note/siyuan/issues/19305

Daniel92f37743d813
diff --git a/app/src/config/entryVisibility/menu.ts b/app/src/config/entryVisibility/menu.ts
index 2cc2a5b704..1ff2e88ac0 100644
--- a/app/src/config/entryVisibility/menu.ts
+++ b/app/src/config/entryVisibility/menu.ts
@@ -2,7 +2,7 @@ import {buildEntryVisibilityMenuItems as buildMenuItems,
buildEntryVisibilityToggleItem as buildToggleItem,
IEntryVisibilityMenuRuntime,
} from "./menuItems";
-import {getDockEntryKey, TOP_BAR_ROOT_PATH} from "./catalog";
+import {getDockEntryKey, STATUS_BAR_ROOT_PATH, TOP_BAR_ROOT_PATH} from "./catalog";
import {getEntryOrder, isEntryVisible, setEntryVisibilityValue} from "./runtime";
const findEntryElement = (path: string) => {
@@ -25,6 +25,11 @@ const findEntryElement = (path: string) => {
};
const getEntryIcon = (path: string): Pick<IMenu, "icon" | "iconHTML"> => {
+ if (path === `${STATUS_BAR_ROOT_PATH}.message` || path === `${STATUS_BAR_ROOT_PATH}.backgroundTask` ||
+ path === `${STATUS_BAR_ROOT_PATH}.counter`) {
+ // 动态状态内容不作为菜单图标,保留默认图标占位。
+ return {};
+ }
if (path === `${TOP_BAR_ROOT_PATH}.toolbarVIP` || path === `${TOP_BAR_ROOT_PATH}.toolbarTitle`) {
return {icon: "iconAccount"};
}