From f3ccb0e7d1e30d333a008e3b1c9166bab67574b9 Mon Sep 17 00:00:00 2001 From: Shane Harris Date: Thu, 12 Aug 2021 12:32:37 +0200 Subject: [PATCH] fixes #123 in that it opens any non detected urls in the users defualt browser. --- electron/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electron/app.ts b/electron/app.ts index bad3e63..aa2b05b 100644 --- a/electron/app.ts +++ b/electron/app.ts @@ -1,4 +1,4 @@ -import { app, protocol, ipcMain, Menu, MenuItemConstructorOptions, BrowserWindow } from 'electron'; +import { app, protocol, ipcMain, Menu, MenuItemConstructorOptions, BrowserWindow, shell } from 'electron'; import { StateStorage, EnvironmentConfig } from './state-storage'; import { AppWindow } from './window'; const path = require('path'); @@ -521,6 +521,8 @@ function createWindow() { BrowserWindow.getAllWindows() .filter(b => b !== mainWindow) .forEach(b => b.close()); + } else { + shell.openExternal(url); } item.cancel(); });