optimize the menu bar for macOS
This commit is contained in:
parent
94ba59afb5
commit
a51b2cd333
2 changed files with 23 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
.env
|
.env
|
||||||
|
.DS_Store
|
||||||
|
.idea/
|
|
@ -28,6 +28,7 @@ import { Settings, VencordSettings } from "./settings";
|
||||||
import { createSplashWindow } from "./splash";
|
import { createSplashWindow } from "./splash";
|
||||||
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
||||||
import { downloadVencordFiles, ensureVencordFiles } from "./utils/vencordLoader";
|
import { downloadVencordFiles, ensureVencordFiles } from "./utils/vencordLoader";
|
||||||
|
import { SettingsRouter } from "@vencord/types/webpack/common";
|
||||||
|
|
||||||
let isQuitting = false;
|
let isQuitting = false;
|
||||||
let tray: Tray;
|
let tray: Tray;
|
||||||
|
@ -182,13 +183,31 @@ function initMenuBar(win: BrowserWindow) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isDarwin && {
|
isDarwin && {
|
||||||
label: "Hide",
|
type: "separator"
|
||||||
|
},
|
||||||
|
isDarwin && {
|
||||||
|
label: "Settings",
|
||||||
|
accelerator: "CmdOrCtrl+,",
|
||||||
|
async click() {
|
||||||
|
mainWin.webContents.executeJavaScript("Vencord.Webpack.Common.SettingsRouter.open()")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isDarwin && {
|
||||||
|
type: "separator"
|
||||||
|
},
|
||||||
|
isDarwin && {
|
||||||
|
label: "Hide Vesktop",
|
||||||
role: "hide"
|
role: "hide"
|
||||||
},
|
},
|
||||||
isDarwin && {
|
isDarwin && {
|
||||||
label: "Hide others",
|
|
||||||
role: "hideOthers"
|
role: "hideOthers"
|
||||||
},
|
},
|
||||||
|
isDarwin && {
|
||||||
|
role: "unhide",
|
||||||
|
},
|
||||||
|
isDarwin && {
|
||||||
|
type: "separator"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Quit",
|
label: "Quit",
|
||||||
accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,
|
accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,
|
||||||
|
|
Reference in a new issue