feat: add hide menu bar items on macOS

This commit is contained in:
Ryan Cao 2023-07-09 15:32:37 +08:00
parent b4da701080
commit d32e17e70b
No known key found for this signature in database

View file

@ -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,