1
0

fix: open links in OS default browser

Resolves https://kolaente.dev/vikunja/desktop/issues/130
This commit is contained in:
kolaente 2022-12-23 19:04:45 +01:00
parent da183cd0d5
commit 99153187d7
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -17,10 +17,10 @@ function createWindow() {
})
// Open external links in the browser
mainWindow.webContents.on('new-window', function (e, url) {
e.preventDefault()
shell.openExternal(url)
})
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
shell.openExternal(url);
return { action: 'deny' };
});
// Hide the toolbar
mainWindow.setMenuBarVisibility(false)