mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-27 20:11:15 +02:00
feat: add logs when minimize and maximize (tray and not)
This commit is contained in:
@@ -118,9 +118,11 @@ function registerIpcHandlers(getMainWindow) {
|
|||||||
// Minimize to tray
|
// Minimize to tray
|
||||||
if (configFeatures.systemTray) {
|
if (configFeatures.systemTray) {
|
||||||
getMainWindow()?.hide()
|
getMainWindow()?.hide()
|
||||||
|
logger.info("Window Minimized in SystemTray (Using Minimize Button)");
|
||||||
} else {
|
} else {
|
||||||
// Native minimize
|
// Native minimize
|
||||||
getMainWindow()?.minimize()
|
getMainWindow()?.minimize()
|
||||||
|
logger.info("Window minimized normally");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ function createSystemTray(devMode) {
|
|||||||
if (window && !window.isDestroyed()) {
|
if (window && !window.isDestroyed()) {
|
||||||
window.show();
|
window.show();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
logger.info("Window Restored from SystemTray (Using Show Action)");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -94,6 +95,7 @@ function createSystemTray(devMode) {
|
|||||||
} else {
|
} else {
|
||||||
window.show();
|
window.show();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
logger.info("Window Restored from SystemTray (Double Click on Tray Icon)")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ async function createMainWindow() {
|
|||||||
if (!app.isQuitting && config.configFeatures.systemTray) {
|
if (!app.isQuitting && config.configFeatures.systemTray) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
mainWindow.hide();
|
mainWindow.hide();
|
||||||
|
logger.info("Window Minimized in SystemTray (Using Close Button)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user