mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-22 08:16:10 +01:00
This commit is contained in:
parent
3f5dc6432f
commit
f3513e9408
2 changed files with 8 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ import {highlightRender} from "../../protyle/markdown/highlightRender";
|
|||
import {blockRender} from "../../protyle/markdown/blockRender";
|
||||
import {disabledForeverProtyle, disabledProtyle, enableProtyle} from "../../protyle/util/onGet";
|
||||
import {setStorageVal} from "../../protyle/util/compatibility";
|
||||
import {closePanel} from "./closePanel";
|
||||
|
||||
const forwardStack: IBackStack[] = [];
|
||||
|
||||
|
|
@ -113,6 +114,9 @@ export const goBack = () => {
|
|||
if (window.siyuan.menus.menu.element.classList.contains("b3-menu--fullscreen") && !window.siyuan.menus.menu.element.classList.contains("fn__none")) {
|
||||
window.siyuan.menus.menu.element.dispatchEvent(new CustomEvent("click", {detail: "back"}));
|
||||
return;
|
||||
} else if (document.getElementById("model").style.top === "0px") {
|
||||
closePanel();
|
||||
return;
|
||||
} else if (window.siyuan.backStack.length < 1) {
|
||||
window.JSAndroid.returnDesktop();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
export const closePanel = () => {
|
||||
const menuElement = document.getElementById("menu");
|
||||
const sidebarElement = document.getElementById("sidebar");
|
||||
const scrimElement = document.querySelector(".scrim");
|
||||
const modelElement = document.getElementById("model");
|
||||
menuElement.style.right = "-100vw";
|
||||
sidebarElement.style.left = "-100vw";
|
||||
modelElement.style.top = "-200vh";
|
||||
scrimElement.classList.add("fn__none");
|
||||
document.getElementById("menu").style.right = "-100vw";
|
||||
document.getElementById("sidebar").style.left = "-100vw";
|
||||
document.getElementById("model").style.top = "-200vh";
|
||||
document.querySelector(".scrim").classList.add("fn__none");
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue