mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +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();
|
currentWindow.minimize();
|
||||||
});
|
});
|
||||||
closeBtnElement.addEventListener("click", () => {
|
closeBtnElement.addEventListener("click", () => {
|
||||||
winOnClose(currentWindow);
|
if (isWindow()) {
|
||||||
|
currentWindow.destroy();
|
||||||
|
} else {
|
||||||
|
winOnClose(currentWindow);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
/// #else
|
/// #else
|
||||||
document.querySelector(".toolbar").classList.add("toolbar--browser");
|
if (!isWindow()) {
|
||||||
window.addEventListener("beforeunload", () => {
|
document.querySelector(".toolbar").classList.add("toolbar--browser");
|
||||||
exportLayout(false);
|
window.addEventListener("beforeunload", () => {
|
||||||
}, false);
|
exportLayout(false);
|
||||||
window.addEventListener("pagehide", () => {
|
}, false);
|
||||||
exportLayout(false);
|
window.addEventListener("pagehide", () => {
|
||||||
}, false);
|
exportLayout(false);
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
/// #endif
|
/// #endif
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ export const setTabPosition = () => {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rect.top <= 0 && rect.right >= window.innerWidth) {
|
if (rect.top <= 0 && rect.right >= window.innerWidth) {
|
||||||
(headerElement.lastElementChild as HTMLElement).style.paddingRight = (42 * 3) + "px";
|
(headerElement.lastElementChild as HTMLElement).style.paddingRight = (32 * 3) + "px";
|
||||||
} else {
|
} else {
|
||||||
(headerElement.lastElementChild as HTMLElement).style.paddingRight = "";
|
(headerElement.lastElementChild as HTMLElement).style.paddingRight = "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue