From 0c1e8fe8996caab34c608aff9cc7c383fd6ee52d Mon Sep 17 00:00:00 2001 From: MasterAcnolo <68693319+MasterAcnolo@users.noreply.github.com> Date: Sat, 20 Dec 2025 11:28:04 +0100 Subject: [PATCH] refactor: Remove setupMenu function and its invocation from app initialization --- main.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/main.js b/main.js index 7e697e8..aa43415 100644 --- a/main.js +++ b/main.js @@ -150,46 +150,6 @@ ipcMain.on("open-wiki", () => { shell.openExternal("https://masteracnolo.github.io/FreedomLoader/pages/wiki.html"); }); -// Menu -function setupMenu() { - const menuTemplate = [ - { - label: "Logs", - submenu: [ - { - label: "Open Logs", - click: () => shell.openPath(logsFolderPath), - }, - ], - }, - { - label: "Website", - submenu: [ - { - label: "Go to Website", - click: () => shell.openExternal("https://masteracnolo.github.io/FreedomLoader/"), - }, - ], - }, - { - label: "Documentation", - submenu: [ - { - label: "Go to Wiki", - click: () => shell.openExternal("https://masteracnolo.github.io/FreedomLoader/pages/wiki.html"), - }, - ], - }, - - ]; - - const defaultMenu = Menu.getApplicationMenu(); - const mergedTemplate = defaultMenu - ? [...defaultMenu.items.map(item => item), ...menuTemplate] - : menuTemplate; - - Menu.setApplicationMenu(Menu.buildFromTemplate(mergedTemplate)); -} // App ready app.whenReady().then(async () => { @@ -208,7 +168,6 @@ app.whenReady().then(async () => { await createMainWindow(); AutoUpdater(mainWindow); - setupMenu(); } catch (err) { logger.error("Window or Server error :", err); app.quit();