From d8fa740067747ae21963f81f9d12aaa7b6a0193a Mon Sep 17 00:00:00 2001 From: Max Novich Date: Wed, 28 May 2025 08:16:26 -0700 Subject: [PATCH] allow quick quit in dev mode (#2692) --- ui/desktop/src/main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index 1a3b7b44..3c64b362 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -1290,8 +1290,13 @@ app.on('will-quit', () => { }); // Quit when all windows are closed, except on macOS or if we have a tray icon. -// Add confirmation dialog when quitting with Cmd+Q +// Add confirmation dialog when quitting with Cmd+Q (skip in dev mode) app.on('before-quit', (event) => { + // Skip confirmation dialog in development mode + if (MAIN_WINDOW_VITE_DEV_SERVER_URL) { + return; // Allow normal quit behavior in dev mode + } + // Prevent the default quit behavior event.preventDefault();