diff --git a/src/native/about.ts b/src/native/about.ts index 5cd6f22..d43c590 100644 --- a/src/native/about.ts +++ b/src/native/about.ts @@ -9,6 +9,12 @@ export let aboutWindow: BrowserWindow; // Create our about window export function createAboutWindow() { + // If our about window already exists, show it + if (aboutWindow) { + aboutWindow.show(); + return; + } + aboutWindow = new BrowserWindow({ minWidth: 300, minHeight: 300, @@ -30,6 +36,7 @@ export function createAboutWindow() { }, }); + // Remove the default menu aboutWindow.setMenu(null); aboutWindow.loadFile(join(__dirname, "about.html")); diff --git a/src/native/window.ts b/src/native/window.ts index 1a55b9d..2210675 100644 --- a/src/native/window.ts +++ b/src/native/window.ts @@ -148,11 +148,7 @@ export function createMainWindow() { mainWindow.webContents.setZoomLevel(0); } else if (input.key === "F1") { event.preventDefault(); - if (!aboutWindow) { - createAboutWindow(); - } else { - aboutWindow.show(); - } + createAboutWindow(); } else if ( input.key === "F5" || ((input.control || input.meta) && input.key.toLowerCase() === "r")