mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Improve #commonMenu menu (#16170)
fix https://github.com/siyuan-note/siyuan/pull/16141
This commit is contained in:
parent
3f9e6d0eaa
commit
ba4dd38206
2 changed files with 4 additions and 3 deletions
|
|
@ -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"; // 移动端侧栏插件选项菜单
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue