diff --git a/src/main/index.ts b/src/main/index.ts index 35475e84d5..e646f7b8fe 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -91,9 +91,6 @@ app.on("will-quit", (event) => { if (userStore.preferences.trayEnabled) { return; // with tray the app remains open } else { - windowManager?.destroy(); - clusterManager?.stop(); - proxyServer?.close(); app.exit(); // forced app.quit() } }) diff --git a/src/main/menu.ts b/src/main/menu.ts index a581fb02fb..6e3ddea7be 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -78,14 +78,12 @@ export function buildMenu(windowManager: WindowManager) { { role: 'unhide' }, { type: 'separator' }, { - label: 'Force Quit', - accelerator: 'Cmd+Shift+Q', + label: 'Quit', + accelerator: 'Cmd+Q', click() { - app.exit(0); // force quit since might be blocked within app.on("will-quit") + app.exit(); // force quit since might be blocked within app.on("will-quit") } - }, - { type: 'separator' }, - { role: 'quit' }, + } ] }; diff --git a/src/main/tray.ts b/src/main/tray.ts index f77d7dddd9..5a43aec50a 100644 --- a/src/main/tray.ts +++ b/src/main/tray.ts @@ -2,7 +2,7 @@ import path from "path" import sharp from "sharp"; import jsdom from "jsdom" import packageInfo from "../../package.json" -import { dialog, Menu, NativeImage, nativeImage, nativeTheme, Tray } from "electron" +import { app, dialog, Menu, NativeImage, nativeImage, nativeTheme, Tray } from "electron" import { isDevelopment, isMac } from "../common/vars"; import { autorun } from "mobx"; import { showAbout } from "./menu"; @@ -131,5 +131,12 @@ export function createTrayMenu(windowManager: WindowManager): Menu { } }, }, + { type: 'separator' }, + { + label: 'Quit App', + click() { + app.exit(); + } + } ]); }