A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang. (PERSONAL FORK)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:art: Improve lock screen interaction https://github.com/siyuan-note/siyuan/issues/17065

Signed-off-by: Daniel <845765@qq.com>

Daniel 498441c4 3e118f24

+4 -4
+2 -2
app/stage/auth.html
··· 581 581 }) 582 582 583 583 // 用于授权页保持连接,避免非常驻内存内核自动退出 https://github.com/siyuan-note/insider/issues/1099 584 - const ws = new WebSocket((window.location.protocol === 'https:' ? 'wss' : 'ws') + '://' + window.location.host + '/ws?app=siyuan&id=auth') 584 + const ws = new WebSocket((window.location.protocol === 'https:' ? 'wss' : 'ws') + '://' + window.location.host + '/ws?app=siyuan' + Math.random().toString(36).substring(8) + '&id=auth&type=auth') 585 585 ws.onmessage = (event) => { 586 - const data = processMessage(JSON.parse(event.data)); 586 + const data = JSON.parse(event.data); 587 587 if (data.cmd === "loginAuth") { 588 588 window.location.href = toPath 589 589 }
+1 -1
kernel/model/session.go
··· 153 153 return 154 154 } 155 155 156 - util.BroadcastByType("main", "loginAuth", 0, "", nil) 156 + util.BroadcastByType("auth", "loginAuth", 0, "", nil) 157 157 } 158 158 159 159 func GetCaptcha(c *gin.Context) {
+1 -1
kernel/server/serve.go
··· 727 727 728 728 if !authOk { 729 729 // 用于授权页保持连接,避免非常驻内存内核自动退出 https://github.com/siyuan-note/insider/issues/1099 730 - authOk = strings.Contains(s.Request.RequestURI, "/ws?app=siyuan&id=auth") 730 + authOk = strings.Contains(s.Request.RequestURI, "/ws?app=siyuan") && strings.Contains(s.Request.RequestURI, "&id=auth&type=auth") 731 731 } 732 732 733 733 if !authOk {