mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
This commit is contained in:
parent
bcf05a6d21
commit
e14e8749c9
3 changed files with 15 additions and 10 deletions
|
|
@ -660,6 +660,17 @@ app.whenReady().then(() => {
|
|||
ipcMain.on('siyuan-export-close', (event, id) => {
|
||||
BrowserWindow.fromId(id).webContents.send('siyuan-export-close', id)
|
||||
})
|
||||
ipcMain.on('siyuan-export-prevent', (event, id) => {
|
||||
BrowserWindow.fromId(id).webContents.on('will-navigate', (event, url) => {
|
||||
const currentURL = new URL(event.sender.getURL())
|
||||
if (url.startsWith(getServer(currentURL.port))) {
|
||||
return
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
shell.openExternal(url)
|
||||
})
|
||||
})
|
||||
ipcMain.on('siyuan-quit', (event, id) => {
|
||||
const mainWindow = BrowserWindow.fromId(id)
|
||||
let tray
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue