Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-12-09 11:13:49 +08:00
commit d24874154d
7 changed files with 36 additions and 13 deletions

View file

@ -297,7 +297,11 @@ export const exitSiYuan = async () => {
/// #if !BROWSER
ipcRenderer.send(Constants.SIYUAN_QUIT, location.port);
/// #else
if (isInIOS() || isInAndroid() || isInHarmony()) {
if (isInAndroid()) {
window.JSAndroid.exit();
return;
}
if (isInIOS() || isInHarmony()) {
window.location.href = "siyuan://api/system/exit";
}
/// #endif
@ -342,7 +346,11 @@ export const exitSiYuan = async () => {
/// #if !BROWSER
ipcRenderer.send(Constants.SIYUAN_QUIT, location.port);
/// #else
if (isInIOS() || isInAndroid() || isInHarmony()) {
if (isInAndroid()) {
window.JSAndroid.exit();
return;
}
if (isInIOS() || isInHarmony()) {
window.location.href = "siyuan://api/system/exit";
}
/// #endif

View file

@ -250,6 +250,7 @@ interface Window {
hideKeyboard(): void
print(title: string, html: string): void
getScreenWidthPx(): number
exit(): void
};
JSHarmony: {
openExternal(url: string): void