mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 20:48:06 +01:00
This commit is contained in:
parent
40b9c62693
commit
e24522b75d
8 changed files with 62 additions and 62 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {exportLayout, JSONToLayout, resetLayout, resizeTopBar} from "../layout/util";
|
||||
import {exportLayout, JSONToLayout, resetLayout, resizeTopBar, saveLayout} from "../layout/util";
|
||||
import {resizeTabs} from "../layout/tabUtil";
|
||||
import {setStorageVal} from "../protyle/util/compatibility";
|
||||
/// #if !BROWSER
|
||||
|
|
@ -172,19 +172,6 @@ const winOnMaxRestore = async () => {
|
|||
/// #endif
|
||||
};
|
||||
|
||||
const saveUI = () => {
|
||||
exportLayout({
|
||||
reload: false,
|
||||
onlyData: false,
|
||||
errorExit: false
|
||||
});
|
||||
};
|
||||
|
||||
export const unbindSaveUI = () => {
|
||||
window.removeEventListener("beforeunload", saveUI);
|
||||
window.removeEventListener("pagehide", saveUI);
|
||||
};
|
||||
|
||||
export const initWindow = async (app: App) => {
|
||||
/// #if !BROWSER
|
||||
const winOnClose = (close = false) => {
|
||||
|
|
@ -514,7 +501,5 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
|
|||
if (!isWindow()) {
|
||||
document.querySelector(".toolbar").classList.add("toolbar--browser");
|
||||
}
|
||||
window.addEventListener("beforeunload", saveUI, false);
|
||||
window.addEventListener("pagehide", saveUI, false);
|
||||
/// #endif
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue