From d32e17e70bae437517c27c21108029e4722bc86f Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sun, 9 Jul 2023 15:32:37 +0800 Subject: [PATCH] feat: add hide menu bar items on macOS --- src/main/mainWindow.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 4e115a1..b08e9da 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -133,6 +133,18 @@ function initMenuBar(win: BrowserWindow) { app.quit(); } }, + ...(process.platform === "darwin" + ? [ + { + label: "Hide", + role: "hide" as const + }, + { + label: "Hide others", + role: "hideOthers" as const + } + ] + : []), { label: "Quit", accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,