Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16544

Vanessa3ac342dcf330
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index cc57bfd8f5..d97c7ba1db 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -301,7 +301,12 @@ export const exitSiYuan = async (setCurrentWorkspace = true) => {
window.JSAndroid.exit();
return;
}
- if (isInIOS() || isInHarmony()) {
+ if (isInIOS()) {
+ window.webkit.messageHandlers.exit.postMessage();
+ return;
+ }
+
+ if (isInHarmony()) {
window.location.href = "siyuan://api/system/exit";
}
/// #endif
@@ -352,7 +357,12 @@ export const exitSiYuan = async (setCurrentWorkspace = true) => {
window.JSAndroid.exit();
return;
}
- if (isInIOS() || isInHarmony()) {
+ if (isInIOS()) {
+ window.webkit.messageHandlers.exit.postMessage();
+ return;
+ }
+
+ if (isInHarmony()) {
window.location.href = "siyuan://api/system/exit";
}
/// #endif
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 903c058592..0d214a1396 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -228,6 +228,7 @@ interface Window {
setClipboard: { postMessage: (url: string) => void }
purchase: { postMessage: (url: string) => void }
print: { postMessage: (html: string) => void }
+ exit: { postMessage: () => void }
}
};
htmlToImage: {