mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
desktop: only show native menus on macos
This commit is contained in:
@@ -22,6 +22,7 @@ import { shallow } from "zustand/shallow";
|
|||||||
import { MenuItem, PositionOptions } from "@notesnook/ui";
|
import { MenuItem, PositionOptions } from "@notesnook/ui";
|
||||||
import { desktop } from "../common/desktop-bridge";
|
import { desktop } from "../common/desktop-bridge";
|
||||||
import { useThemeEngineStore } from "@notesnook/theme";
|
import { useThemeEngineStore } from "@notesnook/theme";
|
||||||
|
import { isMac } from "../utils/platform";
|
||||||
|
|
||||||
type MenuOptions = {
|
type MenuOptions = {
|
||||||
position?: PositionOptions;
|
position?: PositionOptions;
|
||||||
@@ -45,7 +46,7 @@ const useMenuStore = create<MenuStore>((set) => ({
|
|||||||
blocking: false
|
blocking: false
|
||||||
},
|
},
|
||||||
open: async (items, options) => {
|
open: async (items, options) => {
|
||||||
if (IS_DESKTOP_APP && canShowNativeMenu(items)) {
|
if (IS_DESKTOP_APP && canShowNativeMenu(items) && isMac()) {
|
||||||
const serializedItems = await resolveMenuItems(items);
|
const serializedItems = await resolveMenuItems(items);
|
||||||
const scopes = useThemeEngineStore.getState().theme.scopes;
|
const scopes = useThemeEngineStore.getState().theme.scopes;
|
||||||
const menuIconColor =
|
const menuIconColor =
|
||||||
|
|||||||
Reference in New Issue
Block a user