allow quick quit in dev mode (#2692)
This commit is contained in:
@@ -1290,8 +1290,13 @@ app.on('will-quit', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Quit when all windows are closed, except on macOS or if we have a tray icon.
|
// 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) => {
|
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
|
// Prevent the default quit behavior
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user