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: Improve #commonMenu menu (#16170)
Jeffrey Chenba4dd3820684
diff --git a/app/src/constants.ts b/app/src/constants.tsindex a4c7bd26b3..4cd1679785 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -228,7 +228,8 @@ export abstract class Constants {public static readonly MENU_BAR_WORKSPACE = "barWorkspace"; // 顶栏主菜单public static readonly MENU_BAR_PLUGIN = "topBarPlugin"; // 顶栏插件菜单public static readonly MENU_BAR_ZOOM = "barZoom"; // 顶栏缩放菜单- public static readonly MENU_BAR_MORE = "barmore"; // 顶栏外观菜单+ public static readonly MENU_BAR_MODE = "barmode"; // 顶栏外观菜单+ public static readonly MENU_BAR_MORE = "barmore"; // 顶栏更多菜单public static readonly MENU_STATUS_HELP = "statusHelp"; // 状态栏帮助菜单public static readonly MENU_STATUS_BACKGROUND_TASK = "statusBackgroundTask"; // 状态栏后台任务菜单public static readonly MENU_DOCK_MOBILE = "dockMobileMenu"; // 移动端侧栏插件选项菜单diff --git a/app/src/layout/topBar.ts b/app/src/layout/topBar.tsindex 94af5aa823..f8e3cbff51 100644--- a/app/src/layout/topBar.ts+++ b/app/src/layout/topBar.ts@@ -127,12 +127,12 @@ export const initBar = (app: App) => {break;} else if (targetId === "barMode") {if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&- window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_BAR_MORE) {+ window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_BAR_MODE) {window.siyuan.menus.menu.remove();return;}window.siyuan.menus.menu.remove();- window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_BAR_MORE);+ window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_BAR_MODE);window.siyuan.menus.menu.append(new MenuItem({id: "themeLight",label: window.siyuan.languages.themeLight,