mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
35 lines
802 B
TypeScript
35 lines
802 B
TypeScript
|
|
import { Menu, MenuItem } from "electron";
|
|
import { mainWindow } from "./main";
|
|
const menu = new Menu();
|
|
menu.append(
|
|
new MenuItem({
|
|
label: "ArmCord" + process.env.npm_package_version,
|
|
submenu: [
|
|
{
|
|
role: "toggleDevTools",
|
|
accelerator:
|
|
process.platform === "darwin" ? "Ctrl+Cmd+I" : "Ctrl+Shift+I",
|
|
click: () => {
|
|
mainWindow.webContents.toggleDevTools();
|
|
},
|
|
},
|
|
{
|
|
role: "toggleDevTools",
|
|
accelerator: "F12",
|
|
click: () => {
|
|
mainWindow.webContents.toggleDevTools();
|
|
},
|
|
},
|
|
{
|
|
role: "reload",
|
|
accelerator:
|
|
"Ctrl+F5",
|
|
click: () => {
|
|
mainWindow.webContents.reload();
|
|
},
|
|
},
|
|
],
|
|
})
|
|
);
|
|
Menu.setApplicationMenu(menu); |