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,