mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 04:10:16 +01:00
This commit is contained in:
parent
3812929426
commit
c50115e016
1 changed files with 7 additions and 1 deletions
|
|
@ -581,7 +581,13 @@
|
|||
})
|
||||
|
||||
// 用于授权页保持连接,避免非常驻内存内核自动退出 https://github.com/siyuan-note/insider/issues/1099
|
||||
new WebSocket((window.location.protocol === 'https:' ? 'wss' : 'ws') + '://' + window.location.host + '/ws?app=siyuan&id=auth')
|
||||
const ws = new WebSocket((window.location.protocol === 'https:' ? 'wss' : 'ws') + '://' + window.location.host + '/ws?app=siyuan&id=auth')
|
||||
ws.onmessage = (event) => {
|
||||
const data = processMessage(JSON.parse(event.data));
|
||||
if (data.cmd === "loginAuth") {
|
||||
window.location.href = toPath
|
||||
}
|
||||
};
|
||||
}
|
||||
init();
|
||||
window.addEventListener("click", (event) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue