feat: add logs when minimize and maximize (tray and not)

This commit is contained in:
MasterAcnolo
2026-09-10 12:01:07 +02:00
parent b9267ec408
commit 0f0bb874bf
3 changed files with 5 additions and 0 deletions

View File

@@ -118,9 +118,11 @@ function registerIpcHandlers(getMainWindow) {
// Minimize to tray
if (configFeatures.systemTray) {
getMainWindow()?.hide()
logger.info("Window Minimized in SystemTray (Using Minimize Button)");
} else {
// Native minimize
getMainWindow()?.minimize()
logger.info("Window minimized normally");
}
}
);

View File

@@ -62,6 +62,7 @@ function createSystemTray(devMode) {
if (window && !window.isDestroyed()) {
window.show();
window.focus();
logger.info("Window Restored from SystemTray (Using Show Action)");
}
},
},
@@ -94,6 +95,7 @@ function createSystemTray(devMode) {
} else {
window.show();
window.focus();
logger.info("Window Restored from SystemTray (Double Click on Tray Icon)")
}
});

View File

@@ -91,6 +91,7 @@ async function createMainWindow() {
if (!app.isQuitting && config.configFeatures.systemTray) {
event.preventDefault();
mainWindow.hide();
logger.info("Window Minimized in SystemTray (Using Close Button)");
return false;
}
});