Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"; // 移动端侧栏插件选项菜单
Expand Down
4 changes: 2 additions & 2 deletions app/src/layout/topBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down