An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve exit
Danielc4326bd9d984
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex 33f64bd058..b804ea5cdb 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -264,6 +264,7 @@ interface Window {returnDesktop(): voidprint(title: string, html: string): voidgetScreenWidthPx(): number+ exit(): void};Protyle: import("../protyle/method").default;diff --git a/app/stage/auth.html b/app/stage/auth.htmlindex ebd19a3576..8d5d509414 100644--- a/app/stage/auth.html+++ b/app/stage/auth.html@@ -428,11 +428,17 @@return;}- if ((window.webkit && window.webkit.messageHandlers) || window.JSHarmony) {- window.location.href = 'siyuan://api/system/exit'- } else {- window.location.reload()+ if (window.webkit && window.webkit.messageHandlers) {+ window.webkit.messageHandlers.exit.postMessage("");+ return;+ }++ if (window.JSHarmony) {+ window.JSHarmony.exit();+ return;}++ window.location.reload()}}@@ -472,7 +478,7 @@}}- const showMessage = (msg)=> {+ const showMessage = (msg) => {document.querySelector('#message').classList.add('b3-snackbar--show')document.querySelector('#message').firstElementChild.innerHTML = msgsetTimeout(() => {@@ -485,7 +491,7 @@const inputElement = document.getElementById('authCode')const captchaElement = document.getElementById('captcha')const rememberMeElement = document.getElementById('rememberMe')- let code = inputElement.value.trim();+ let code = inputElement.value.trim();if ("" === code) {showMessage({{.l9}})inputElement.value = ''