From c6fc699fe0707d872da0c93f5ba67abc4e282eb8 Mon Sep 17 00:00:00 2001 From: salman Date: Sun, 6 Sep 2026 22:37:58 +0200 Subject: [PATCH] Link the online user manual from the Quick Start footer --- main.js | 12 +++++++++++- quick-start.html | 1 + tests/help-window.test.js | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index c341ce2..e88155f 100644 --- a/main.js +++ b/main.js @@ -1,7 +1,7 @@ // Copyright (C) 2026 Zaher Salman // SPDX-License-Identifier: GPL-3.0-or-later -const { app, BrowserWindow, Menu, dialog, ipcMain, screen } = require('electron'); +const { app, BrowserWindow, Menu, dialog, ipcMain, screen, shell } = require('electron'); const path = require('path'); const childProcess = require('child_process'); @@ -57,6 +57,16 @@ function createAuxiliaryWindow(options = {}) { } }); + // Auxiliary windows have no in-app navigation of their own. Send external + // links (the Quick Start references the online docs) to the system browser + // instead of spawning a new Electron window that would leave a dead frame. + auxiliaryWindow.webContents.setWindowOpenHandler(function (details) { + if (/^https?:\/\//i.test(details.url)) { + shell.openExternal(details.url); + } + return { action: "deny" }; + }); + if (options.dataChannel) { auxiliaryWindow.webContents.once("did-finish-load", () => { auxiliaryWindow.webContents.send(options.dataChannel, options.data || {}); diff --git a/quick-start.html b/quick-start.html index 5c94a5e..2897ecd 100644 --- a/quick-start.html +++ b/quick-start.html @@ -53,6 +53,7 @@