Update
All checks were successful
Deploy / deploy-staging (push) Successful in 26s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-08-14 02:03:17 +02:00
parent 3d2b566bf2
commit 3205d9f0f6
6 changed files with 470 additions and 42 deletions

View File

@@ -1671,18 +1671,28 @@ body .tray-pill.tray-pill-status--unconfigured {
.window {
position: absolute;
inset: 0;
width: 100% !important;
height: 100% !important;
min-height: 0;
max-height: none;
left: 0 !important;
top: 0 !important;
border-radius: 0;
border: 0;
box-shadow: none;
}
.window.is-mobile-fullscreen {
left: 0 !important;
border-radius: 0;
border: 0;
box-shadow: none;
}
.window.is-mobile-fullscreen .window-header {
cursor: default;
}
.window.is-mobile-fullscreen .window-resize-handle {
display: none;
}
.window-header {
padding: 10px 12px;
}

View File

@@ -1171,6 +1171,8 @@ if (payloadNode) {
openDebugWindow();
};
const isMobileViewport = () => window.matchMedia('(max-width: 1100px)').matches;
const applyWindowLayout = (record) => {
const { x, y, width, height } = record.layout;
record.node.style.left = `${x}px`;
@@ -1179,6 +1181,35 @@ if (payloadNode) {
record.node.style.height = `${height}px`;
};
const applyManagedWindowFrame = (record) => {
if (isMobileViewport()) {
const mobileTopInset = maximizeOverSystemBar ? 0 : topDesktopInset;
record.node.classList.add('is-mobile-fullscreen');
record.node.style.left = '0px';
record.node.style.top = `${mobileTopInset}px`;
record.node.style.width = '100%';
record.node.style.height = maximizeOverSystemBar
? `calc(100% - ${bottomDesktopInset}px)`
: `calc(100% - ${mobileTopInset + bottomDesktopInset}px)`;
return;
}
record.node.classList.remove('is-mobile-fullscreen');
if (record.state.maximized) {
const maximizedTopInset = maximizeOverSystemBar ? 0 : topDesktopInset;
record.node.style.left = `${sideDesktopInset}px`;
record.node.style.top = `${maximizedTopInset}px`;
record.node.style.width = sideDesktopInset === 0 ? '100%' : `calc(100% - ${sideDesktopInset * 2}px)`;
record.node.style.height = maximizeOverSystemBar
? '100%'
: `calc(100% - ${maximizedTopInset + bottomDesktopInset}px)`;
return;
}
applyWindowLayout(record);
};
const clampWindowLayout = (record) => {
const minX = 0;
const minY = maximizeOverSystemBar ? 0 : topDesktopInset;
@@ -1218,17 +1249,17 @@ if (payloadNode) {
}
if (!record.state.maximized) {
if (isMobileViewport()) {
focusWindow(windowId);
saveWindowState();
return;
}
record.restoreLayout = { ...record.layout };
record.state.maximized = true;
record.node.classList.add('is-maximized');
measureDesktopBounds();
const maximizedTopInset = maximizeOverSystemBar ? 0 : topDesktopInset;
record.node.style.left = `${sideDesktopInset}px`;
record.node.style.top = `${maximizedTopInset}px`;
record.node.style.width = sideDesktopInset === 0 ? '100%' : `calc(100% - ${sideDesktopInset * 2}px)`;
record.node.style.height = maximizeOverSystemBar
? '100%'
: `calc(100% - ${maximizedTopInset + bottomDesktopInset}px)`;
applyManagedWindowFrame(record);
focusWindow(windowId);
saveWindowState();
return;
@@ -1239,7 +1270,7 @@ if (payloadNode) {
if (record.restoreLayout) {
record.layout = { ...record.restoreLayout };
clampWindowLayout(record);
applyWindowLayout(record);
applyManagedWindowFrame(record);
}
focusWindow(windowId);
saveWindowState();
@@ -1537,14 +1568,8 @@ if (payloadNode) {
if (record.state.maximized) {
record.node.classList.add('is-maximized');
measureDesktopBounds();
const maximizedTopInset = maximizeOverSystemBar ? 0 : topDesktopInset;
record.node.style.left = `${sideDesktopInset}px`;
record.node.style.top = `${maximizedTopInset}px`;
record.node.style.width = sideDesktopInset === 0 ? '100%' : `calc(100% - ${sideDesktopInset * 2}px)`;
record.node.style.height = maximizeOverSystemBar
? '100%'
: `calc(100% - ${maximizedTopInset + bottomDesktopInset}px)`;
}
applyManagedWindowFrame(record);
node.addEventListener('mousedown', () => focusWindow(record.id));
@@ -2263,19 +2288,7 @@ if (payloadNode) {
windows.forEach((record) => {
clampWindowLayout(record);
if (record.state.maximized) {
const maximizedTopInset = maximizeOverSystemBar ? 0 : topDesktopInset;
record.node.style.left = `${sideDesktopInset}px`;
record.node.style.top = `${maximizedTopInset}px`;
record.node.style.width = sideDesktopInset === 0 ? '100%' : `calc(100% - ${sideDesktopInset * 2}px)`;
record.node.style.height = maximizeOverSystemBar
? '100%'
: `calc(100% - ${maximizedTopInset + bottomDesktopInset}px)`;
return;
}
applyWindowLayout(record);
applyManagedWindowFrame(record);
});
saveWindowState();