From 84df60e04206de1f6f66fe00e85aab2b5ffa1fb4 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Tue, 21 Oct 2025 14:00:27 +0800 Subject: [PATCH] :art: Improve #commonMenu menu fix https://github.com/siyuan-note/siyuan/pull/16141 --- app/src/constants.ts | 3 ++- app/src/layout/topBar.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/constants.ts b/app/src/constants.ts index a4c7bd26b36..4cd1679785c 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.ts index 94af5aa823c..f8e3cbff516 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,