some clean up

This commit is contained in:
2024-05-29 22:50:18 +02:00
parent fc4b271cc6
commit 1ddead6d4a
+10 -10
View File
@@ -29,7 +29,7 @@ let win;
* - Linux: `app.getPath('exe')`
* - MacOS: `path.resolve(app.getPath('exe'), "../../../../")`
* 3. `__dirname` (Development)
*/
*/
function loadConfig() {
const locations = [
'/assets/presentation',
@@ -81,7 +81,6 @@ async function createWindow() {
});
nativeTheme.themeSource = 'dark';
Menu.setApplicationMenu(null);
// register event callbacks
win.on("closed", function () { win = null; });
@@ -124,7 +123,6 @@ async function createWindow() {
* @param {Event} event
* @returns `true` if the url is allowed, `false` otherwise
*/
function validateDomain(event) {
if (config == undefined) return true;
@@ -181,7 +179,7 @@ function testAndLoadUrl(testurl) {
//------------------------------------------------------------------------------
// Init electon app
// Init electron app
//------------------------------------------------------------------------------
app.whenReady().then(() => {
@@ -193,14 +191,16 @@ app.whenReady().then(() => {
}
createWindow();
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
})
});
Menu.setApplicationMenu(null);
app.on('window-all-closed', () => {
app.quit()
});
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
})