mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 00:08:49 +01:00
🎨 Improve backward for HarmonyOS https://github.com/siyuan-note/siyuan/issues/13676
This commit is contained in:
parent
7e71b8c921
commit
e9f33724b0
2 changed files with 7 additions and 2 deletions
|
|
@ -153,9 +153,13 @@ export const goBack = () => {
|
|||
closePanel();
|
||||
return;
|
||||
}
|
||||
if (window.JSAndroid && window.siyuan.backStack.length < 1) {
|
||||
if ((window.JSAndroid || window.JSHarmony) && window.siyuan.backStack.length < 1) {
|
||||
if (document.querySelector('#message [data-id="exitTip"]')) {
|
||||
window.JSAndroid.returnDesktop();
|
||||
if (window.JSAndroid) {
|
||||
window.JSAndroid.returnDesktop();
|
||||
} else if (window.JSHarmony) {
|
||||
window.JSHarmony.returnDesktop();
|
||||
}
|
||||
} else {
|
||||
showMessage(window.siyuan.languages.returnDesktop, 3000, "info", "exitTip");
|
||||
}
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -199,6 +199,7 @@ interface Window {
|
|||
writeClipboard(text: string): void
|
||||
writeHTMLClipboard(text: string, html: string): void
|
||||
readClipboard(): string
|
||||
returnDesktop(): void
|
||||
}
|
||||
|
||||
Protyle: import("../protyle/method").default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue