Vanessa 2023-01-26 20:59:58 +08:00
parent 77e178051a
commit 9a284590c2
2 changed files with 15 additions and 9 deletions

View file

@ -562,9 +562,14 @@ export const initWindow = () => {
currentWindow.minimize();
});
closeBtnElement.addEventListener("click", () => {
if (isWindow()) {
currentWindow.destroy();
} else {
winOnClose(currentWindow);
}
});
/// #else
if (!isWindow()) {
document.querySelector(".toolbar").classList.add("toolbar--browser");
window.addEventListener("beforeunload", () => {
exportLayout(false);
@ -572,5 +577,6 @@ export const initWindow = () => {
window.addEventListener("pagehide", () => {
exportLayout(false);
}, false);
}
/// #endif
};

View file

@ -39,7 +39,7 @@ export const setTabPosition = () => {
}
} else {
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 {
(headerElement.lastElementChild as HTMLElement).style.paddingRight = "";
}