main: fix external link not working correctly

This commit is contained in:
leejooy96 committed 2023-02-04 17:12:08 +09:00
1 parent c38d6153fe
commit 5599c40db1
3 files changed
+9 -5

No files matched your search

+6 -1
View File
@@ -1,4 +1,4 @@
import { BrowserWindow, ipcMain } from 'electron'
import { BrowserWindow, ipcMain, shell } from 'electron'
import Constants from './utils/Constants'
/*
@@ -10,5 +10,10 @@ export default class IPCs {
ipcMain.on('msgRequestGetVersion', () => {
window.webContents.send('msgReceivedVersion', Constants.APP_VERSION)
})
// Open url via web browser
ipcMain.on('msgOpenExternalLink', async (event, url) => {
await shell.openExternal(url)
})
}
}