This commit is contained in:
2026-03-06 11:11:08 +02:00
parent f580775cc2
commit 5994e165c6
3 changed files with 75 additions and 22 deletions

View File

@@ -616,6 +616,28 @@ body.is-dragging-window .ui-tool-title-bar {
}
}
@media (max-width: 899px) {
.ui-tool-window {
top: 2.85rem !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
height: calc(100dvh - 2.85rem) !important;
min-width: 0;
min-height: 0;
max-width: 100vw;
max-height: calc(100dvh - 2.85rem);
resize: none;
overflow: auto;
transform: none !important;
}
.ui-tool-title-bar {
cursor: default;
}
}
@media (min-width: 2560px), (min-resolution: 2dppx) {
:root {
--ui-scale: 1.24;

View File

@@ -12,6 +12,10 @@
let floatingWindowZ = 80;
let windowLayouts = {};
function isMobileViewport() {
return window.matchMedia('(max-width: 899px)').matches;
}
function applyTheme(theme) {
const normalized = theme || DEFAULT_THEME;
document.documentElement.setAttribute('data-ui-theme', normalized);
@@ -164,6 +168,12 @@
if (!id) {
return;
}
if (isMobileViewport()) {
windowEl.style.right = 'auto';
windowEl.style.bottom = 'auto';
windowEl.style.transform = 'none';
return;
}
const defaults = DEFAULT_WINDOW_LAYOUTS[id];
const saved = windowLayouts[id];
const normalized = normalizeLayout(saved, defaults);
@@ -208,6 +218,9 @@
if (!windowEl || windowEl.classList.contains('hidden')) {
return;
}
if (isMobileViewport()) {
return;
}
bringWindowToFront(windowEl);
const rect = windowEl.getBoundingClientRect();
@@ -269,6 +282,9 @@
if (windowEl.classList.contains('hidden')) {
return;
}
if (isMobileViewport()) {
return;
}
persistWindowLayout(windowEl);
});
});
@@ -285,6 +301,9 @@
});
window.addEventListener('resize', () => {
if (isMobileViewport()) {
return;
}
document.querySelectorAll('.ui-tool-window').forEach((windowEl) => {
const id = windowEl.id;
if (!id) {