Fix: Zoom Issue & Sidebar Overflow

This commit is contained in:
Youwes09
2026-03-30 00:26:04 -05:00
parent d26fa50e76
commit 35ba0171c7
4 changed files with 29 additions and 9 deletions
+20 -1
View File
@@ -79,7 +79,7 @@
let platformScale = $state(1.0);
function applyZoom() {
const uiZoom = store.settings.uiZoom ?? 1.5;
const uiZoom = store.settings.uiZoom ?? 1.0;
const effective = platformScale * uiZoom;
const pct = effective * 100;
document.documentElement.style.zoom = `${pct}%`;
@@ -282,6 +282,25 @@
}
});
function handleZoomKey(e: KeyboardEvent) {
if (!e.ctrlKey) return;
if (e.key === "=" || e.key === "+") {
e.preventDefault();
store.settings.uiZoom = Math.min(2.0, Math.round(((store.settings.uiZoom ?? 1.0) + 0.1) * 10) / 10);
} else if (e.key === "-") {
e.preventDefault();
store.settings.uiZoom = Math.max(0.5, Math.round(((store.settings.uiZoom ?? 1.0) - 0.1) * 10) / 10);
} else if (e.key === "0") {
e.preventDefault();
store.settings.uiZoom = 1.0;
}
}
$effect(() => {
window.addEventListener("keydown", handleZoomKey);
return () => window.removeEventListener("keydown", handleZoomKey);
});
function handleRetry() {
failed = false;
notConfigured = false;