mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-23 05:35:09 +00:00
Fix zoom & about menu items; add version to about page
This commit is contained in:
parent
80f5735d04
commit
fe70701de8
3 changed files with 14 additions and 17 deletions
|
@ -4,7 +4,8 @@
|
||||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserWindow } from "electron";
|
import { app, BrowserWindow } from "electron";
|
||||||
|
import { readFileSync } from "fs";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { ICON_PATH, STATIC_DIR } from "shared/paths";
|
import { ICON_PATH, STATIC_DIR } from "shared/paths";
|
||||||
|
|
||||||
|
@ -19,7 +20,9 @@ export function createAboutWindow() {
|
||||||
|
|
||||||
makeLinksOpenExternally(about);
|
makeLinksOpenExternally(about);
|
||||||
|
|
||||||
about.loadFile(join(STATIC_DIR, "about.html"));
|
const html = readFileSync(join(STATIC_DIR, "about.html"), "utf-8").replaceAll("%VERSION%", app.getVersion());
|
||||||
|
|
||||||
|
about.loadURL("data:text/html;charset=utf-8," + html);
|
||||||
|
|
||||||
return about;
|
return about;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,6 @@ function initMenuBar(win: BrowserWindow) {
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: "About Vencord Desktop",
|
label: "About Vencord Desktop",
|
||||||
role: "about",
|
|
||||||
click: createAboutWindow
|
click: createAboutWindow
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -125,25 +124,20 @@ function initMenuBar(win: BrowserWindow) {
|
||||||
click() {
|
click() {
|
||||||
app.quit();
|
app.quit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// See https://github.com/electron/electron/issues/14742 and https://github.com/electron/electron/issues/5256
|
||||||
|
{
|
||||||
|
label: "Zoom in (hidden, hack for Qwertz and others)",
|
||||||
|
accelerator: "CmdOrCtrl+=",
|
||||||
|
role: "zoomIn",
|
||||||
|
visible: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ role: "fileMenu" },
|
{ role: "fileMenu" },
|
||||||
{ role: "editMenu" },
|
{ role: "editMenu" },
|
||||||
{ role: "viewMenu" },
|
{ role: "viewMenu" },
|
||||||
{ role: "windowMenu" },
|
{ role: "windowMenu" }
|
||||||
{
|
|
||||||
label: "Zoom",
|
|
||||||
submenu: [
|
|
||||||
// See https://github.com/electron/electron/issues/14742 and https://github.com/electron/electron/issues/5256
|
|
||||||
{
|
|
||||||
label: "Zoom in",
|
|
||||||
accelerator: "CmdOrCtrl+=",
|
|
||||||
role: "zoomIn"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Menu.setApplicationMenu(menu);
|
Menu.setApplicationMenu(menu);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>About Vencord Desktop</h1>
|
<h1>Vencord Desktop %VERSION%</h1>
|
||||||
<p>
|
<p>
|
||||||
Vencord Desktop is a free/libre cross platform desktop app aiming to give you a snappier Discord experience with
|
Vencord Desktop is a free/libre cross platform desktop app aiming to give you a snappier Discord experience with
|
||||||
Vencord pre-installed
|
Vencord pre-installed
|
||||||
|
|
Loading…
Add table
Reference in a new issue