Merge branch 'virtmic' into wayland-fixes

This commit is contained in:
V 2023-10-04 00:52:57 +02:00 committed by GitHub
commit c710f67014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 15 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
dist
node_modules
.env
.DS_Store
.idea/

View file

@ -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": [

View file

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

View file

@ -147,6 +147,8 @@ async function clearData(win: BrowserWindow) {
app.quit();
}
type MenuItemList = Array<MenuItemConstructorOptions | false>;
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<MenuItemConstructorOptions | false>;
] satisfies MenuItemList;
const menu = Menu.buildFromTemplate([
{