feature/IO-3066-1-scaffolding: Minor cleanup
This commit is contained in:
@@ -67,6 +67,7 @@ function createWindow(): void {
|
||||
|
||||
const template: Electron.MenuItemConstructorOptions[] = [
|
||||
// { role: 'appMenu' }
|
||||
// @ts-ignore
|
||||
...(isMac
|
||||
? [
|
||||
{
|
||||
@@ -89,7 +90,9 @@ function createWindow(): void {
|
||||
{
|
||||
label: "File",
|
||||
submenu: [
|
||||
// @ts-ignore
|
||||
...(!isMac ? [{ role: "about" }] : []),
|
||||
// @ts-ignore
|
||||
isMac ? { role: "close" } : { role: "quit" },
|
||||
],
|
||||
},
|
||||
@@ -103,6 +106,7 @@ function createWindow(): void {
|
||||
{ role: "cut" },
|
||||
{ role: "copy" },
|
||||
{ role: "paste" },
|
||||
// @ts-ignore
|
||||
...(isMac
|
||||
? [
|
||||
{ role: "pasteAndMatchStyle" },
|
||||
@@ -120,6 +124,7 @@ function createWindow(): void {
|
||||
// { role: 'viewMenu' }
|
||||
{
|
||||
label: "View",
|
||||
// @ts-ignore
|
||||
submenu: [
|
||||
{ role: "reload" },
|
||||
{ role: "forceReload" },
|
||||
@@ -134,6 +139,7 @@ function createWindow(): void {
|
||||
},
|
||||
{
|
||||
label: "Application",
|
||||
// @ts-ignore
|
||||
submenu: [
|
||||
{
|
||||
label: "Open on Startup",
|
||||
@@ -235,6 +241,7 @@ function createWindow(): void {
|
||||
submenu: [
|
||||
{ role: "minimize" },
|
||||
{ role: "zoom" },
|
||||
// @ts-ignore
|
||||
...(isMac
|
||||
? [
|
||||
{ type: "separator" },
|
||||
@@ -257,6 +264,7 @@ function createWindow(): void {
|
||||
// Update the menu to make the hidden item visible
|
||||
// Find the menu item dynamically by its id
|
||||
const fileMenu = template.find((item) => item.label === "Application");
|
||||
// @ts-ignore
|
||||
const hiddenItem = fileMenu?.submenu?.find(
|
||||
(item) => item.id === "development",
|
||||
);
|
||||
@@ -375,7 +383,7 @@ app.whenReady().then(async () => {
|
||||
// module.someFunction()
|
||||
log.debug("Successfully loaded ipcMainConfig", module);
|
||||
} catch (error) {
|
||||
log.error("Failed to load ipcMainconfig", {
|
||||
log.error("Failed to load ipcMainConfig", {
|
||||
...ErrorTypeCheck(error),
|
||||
});
|
||||
}
|
||||
@@ -409,7 +417,7 @@ app.whenReady().then(async () => {
|
||||
|
||||
// if (import.meta.env.DEV) {
|
||||
// // Useful for some dev/debugging tasks, but download can
|
||||
// // not be validated becuase dev app is not signed
|
||||
// // not be validated because dev app is not signed
|
||||
// autoUpdater.channel = "alpha";
|
||||
// autoUpdater.updateConfigPath = path.join(
|
||||
// __dirname,
|
||||
|
||||
Reference in New Issue
Block a user