diff --git a/.gitignore b/.gitignore index 6ee3e11..683ca39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ dist node_modules .env +.DS_Store +.idea/ \ No newline at end of file diff --git a/package.json b/package.json index d2598d7..d4c875e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "VencordDesktop", - "version": "0.3.2", + "version": "0.3.3", "private": true, "description": "", "keywords": [], @@ -33,7 +33,7 @@ "@typescript-eslint/parser": "^6.2.1", "@vencord/types": "^0.1.2", "dotenv": "^16.3.1", - "electron": "^25.8.2", + "electron": "^25.8.4", "electron-builder": "^24.6.3", "esbuild": "^0.18.17", "eslint": "^8.46.0", @@ -66,6 +66,7 @@ "LICENSE" ], "linux": { + "icon": "build/icon.icns", "category": "Network", "maintainer": "vendicated+vesktop@riseup.net", "target": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4437c6f..37b92d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,8 +32,8 @@ devDependencies: specifier: ^16.3.1 version: 16.3.1 electron: - specifier: ^25.8.2 - version: 25.8.2 + specifier: ^25.8.4 + version: 25.8.4 electron-builder: specifier: ^24.6.3 version: 24.6.3 @@ -1766,8 +1766,8 @@ packages: - supports-color dev: true - /electron@25.8.2: - resolution: {integrity: sha512-AM1ra6b16EQuO1bJtiA8ZiWqqFLLgVfxD56ykiy+EA5C63Hkx8OmIbe+5JAsLiTwRVvBZ4oCAj6wa2qT+iq8ww==} + /electron@25.8.4: + resolution: {integrity: sha512-hUYS3RGdaa6E1UWnzeGnsdsBYOggwMMg4WGxNGvAoWtmRrr6J1BsjFW/yRq4WsJHJce2HdzQXtz4OGXV6yUCLg==} engines: {node: '>= 12.20.55'} hasBin: true requiresBuild: true diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index aab75de..57e53e8 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -147,6 +147,8 @@ async function clearData(win: BrowserWindow) { app.quit(); } +type MenuItemList = Array; + function initMenuBar(win: BrowserWindow) { const isWindows = process.platform === "win32"; const isDarwin = process.platform === "darwin"; @@ -181,14 +183,38 @@ function initMenuBar(win: BrowserWindow) { app.quit(); } }, - isDarwin && { - label: "Hide", - role: "hide" - }, - isDarwin && { - label: "Hide others", - role: "hideOthers" - }, + ...(!isDarwin + ? [] + : ([ + { + type: "separator" + }, + { + label: "Settings", + accelerator: "CmdOrCtrl+,", + async click() { + mainWin.webContents.executeJavaScript( + "Vencord.Webpack.Common.SettingsRouter.open('My Account')" + ); + } + }, + { + type: "separator" + }, + { + label: "Hide Vesktop", // Should probably remove the label, but it says "Hide VencordDesktop" instead of "Hide Vesktop" + role: "hide" + }, + { + role: "hideOthers" + }, + { + role: "unhide" + }, + { + type: "separator" + } + ] satisfies MenuItemList)), { label: "Quit", accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0, @@ -213,7 +239,7 @@ function initMenuBar(win: BrowserWindow) { role: "zoomIn", visible: false } - ] satisfies Array; + ] satisfies MenuItemList; const menu = Menu.buildFromTemplate([ {