fix menu, keep hidden toggle dev tools, remove view menu, move force reload to file menu

This commit is contained in:
sawka 2023-01-31 22:55:30 -08:00
parent e52cd6eb21
commit 7fb8c91db7

View File

@ -141,14 +141,15 @@ let menuTemplate = [
role: "appMenu",
},
{
role: "fileMenu",
label: "File",
submenu: [
{role: "close"},
{role: "forceReload"},
],
},
{
role: "editMenu",
},
{
role: "viewMenu",
},
{
role: "windowMenu",
},
@ -201,9 +202,20 @@ function createMainWindow(clientData) {
return;
}
if (input.code == "KeyI" && input.meta) {
e.preventDefault();
if (!input.alt) {
win.webContents.send("i-cmd", mods);
e.preventDefault();
}
else {
win.webContents.toggleDevTools();
}
return;
}
if (input.code == "KeyR" && input.meta) {
e.preventDefault();
if (input.shift) {
win.reload();
}
return;
}