mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
3cc93f2425
commit
22565b9006
12 changed files with 84 additions and 216 deletions
|
|
@ -1051,25 +1051,6 @@ app.whenReady().then(() => {
|
|||
ipcMain.on("siyuan-quit", (event, port) => {
|
||||
exitApp(port);
|
||||
});
|
||||
ipcMain.on("siyuan-reload-window", (event, port) => {
|
||||
BrowserWindow.getAllWindows().forEach((item) => {
|
||||
try {
|
||||
const currentURL = new URL(item.getURL());
|
||||
if (port.toString() === currentURL.port.toString()) {
|
||||
const hasMain = workspaces.find((workspaceItem) => {
|
||||
if (workspaceItem.browserWindow.id === item.id) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (!hasMain) {
|
||||
item.reload();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// load file is not a url
|
||||
}
|
||||
});
|
||||
});
|
||||
ipcMain.on("siyuan-show-window", (event) => {
|
||||
const mainWindow = getWindowByContentId(event.sender.id);
|
||||
if (!mainWindow) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue