Merge branch 'main' into virtmic

This commit is contained in:
V 2023-10-04 00:47:23 +02:00 committed by GitHub
commit edae744784
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 dist
node_modules node_modules
.env .env
.DS_Store
.idea/

View file

@ -1,6 +1,6 @@
{ {
"name": "VencordDesktop", "name": "VencordDesktop",
"version": "0.3.2", "version": "0.3.3",
"private": true, "private": true,
"description": "", "description": "",
"keywords": [], "keywords": [],
@ -33,7 +33,7 @@
"@typescript-eslint/parser": "^6.2.1", "@typescript-eslint/parser": "^6.2.1",
"@vencord/types": "^0.1.2", "@vencord/types": "^0.1.2",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"electron": "^25.8.2", "electron": "^25.8.4",
"electron-builder": "^24.6.3", "electron-builder": "^24.6.3",
"esbuild": "^0.18.17", "esbuild": "^0.18.17",
"eslint": "^8.46.0", "eslint": "^8.46.0",
@ -66,6 +66,7 @@
"LICENSE" "LICENSE"
], ],
"linux": { "linux": {
"icon": "build/icon.icns",
"category": "Network", "category": "Network",
"maintainer": "vendicated+vesktop@riseup.net", "maintainer": "vendicated+vesktop@riseup.net",
"target": [ "target": [

View file

@ -32,8 +32,8 @@ devDependencies:
specifier: ^16.3.1 specifier: ^16.3.1
version: 16.3.1 version: 16.3.1
electron: electron:
specifier: ^25.8.2 specifier: ^25.8.4
version: 25.8.2 version: 25.8.4
electron-builder: electron-builder:
specifier: ^24.6.3 specifier: ^24.6.3
version: 24.6.3 version: 24.6.3
@ -1766,8 +1766,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/electron@25.8.2: /electron@25.8.4:
resolution: {integrity: sha512-AM1ra6b16EQuO1bJtiA8ZiWqqFLLgVfxD56ykiy+EA5C63Hkx8OmIbe+5JAsLiTwRVvBZ4oCAj6wa2qT+iq8ww==} resolution: {integrity: sha512-hUYS3RGdaa6E1UWnzeGnsdsBYOggwMMg4WGxNGvAoWtmRrr6J1BsjFW/yRq4WsJHJce2HdzQXtz4OGXV6yUCLg==}
engines: {node: '>= 12.20.55'} engines: {node: '>= 12.20.55'}
hasBin: true hasBin: true
requiresBuild: true requiresBuild: true

View file

@ -147,6 +147,8 @@ async function clearData(win: BrowserWindow) {
app.quit(); app.quit();
} }
type MenuItemList = Array<MenuItemConstructorOptions | false>;
function initMenuBar(win: BrowserWindow) { function initMenuBar(win: BrowserWindow) {
const isWindows = process.platform === "win32"; const isWindows = process.platform === "win32";
const isDarwin = process.platform === "darwin"; const isDarwin = process.platform === "darwin";
@ -181,14 +183,38 @@ function initMenuBar(win: BrowserWindow) {
app.quit(); app.quit();
} }
}, },
isDarwin && { ...(!isDarwin
label: "Hide", ? []
role: "hide" : ([
}, {
isDarwin && { type: "separator"
label: "Hide others", },
role: "hideOthers" {
}, 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", label: "Quit",
accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0, accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,
@ -213,7 +239,7 @@ function initMenuBar(win: BrowserWindow) {
role: "zoomIn", role: "zoomIn",
visible: false visible: false
} }
] satisfies Array<MenuItemConstructorOptions | false>; ] satisfies MenuItemList;
const menu = Menu.buildFromTemplate([ const menu = Menu.buildFromTemplate([
{ {