mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🐛 Automatic launch at boot does not work Fix https://github.com/siyuan-note/siyuan/issues/7978
This commit is contained in:
parent
8075902681
commit
42c5dfcbda
3 changed files with 13 additions and 9 deletions
|
|
@ -358,13 +358,13 @@ const boot = () => {
|
|||
// 当前页面链接使用浏览器打开
|
||||
currentWindow.webContents.on("will-navigate", (event, url) => {
|
||||
if (event.sender) {
|
||||
const currentURL = new URL(event.sender.getURL());
|
||||
if (url.startsWith(getServer(currentURL.port))) {
|
||||
return;
|
||||
}
|
||||
const currentURL = new URL(event.sender.getURL());
|
||||
if (url.startsWith(getServer(currentURL.port))) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
shell.openExternal(url);
|
||||
event.preventDefault();
|
||||
shell.openExternal(url);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -793,6 +793,9 @@ app.whenReady().then(() => {
|
|||
item.webContents.send("siyuan-send_windows", data);
|
||||
});
|
||||
});
|
||||
ipcMain.on("siyuan-auto-launch", (event, data) => {
|
||||
app.setLoginItemSettings({openAtLogin: data.openAtLogin});
|
||||
});
|
||||
|
||||
if (firstOpen) {
|
||||
const firstOpenWindow = new BrowserWindow({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue