mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
77e178051a
commit
9a284590c2
2 changed files with 15 additions and 9 deletions
|
|
@ -562,15 +562,21 @@ export const initWindow = () => {
|
|||
currentWindow.minimize();
|
||||
});
|
||||
closeBtnElement.addEventListener("click", () => {
|
||||
winOnClose(currentWindow);
|
||||
if (isWindow()) {
|
||||
currentWindow.destroy();
|
||||
} else {
|
||||
winOnClose(currentWindow);
|
||||
}
|
||||
});
|
||||
/// #else
|
||||
document.querySelector(".toolbar").classList.add("toolbar--browser");
|
||||
window.addEventListener("beforeunload", () => {
|
||||
exportLayout(false);
|
||||
}, false);
|
||||
window.addEventListener("pagehide", () => {
|
||||
exportLayout(false);
|
||||
}, false);
|
||||
if (!isWindow()) {
|
||||
document.querySelector(".toolbar").classList.add("toolbar--browser");
|
||||
window.addEventListener("beforeunload", () => {
|
||||
exportLayout(false);
|
||||
}, false);
|
||||
window.addEventListener("pagehide", () => {
|
||||
exportLayout(false);
|
||||
}, false);
|
||||
}
|
||||
/// #endif
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue