From d29cbb84500f366313e1bc46b06a2edff12f2b4b Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Wed, 8 Apr 2026 14:27:24 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Mehrt=C3=A4gige=20Events=20auf=20Tagesen?= =?UTF-8?q?de=20begrenzt,=20Stundenh=C3=B6hen=20weiter=20reduziert=20Timed?= =?UTF-8?q?-Events=20in=20Wochen-/Tagesansicht=20werden=20jetzt=20auf=20Mi?= =?UTF-8?q?tternacht=20(24:00)=20des=20Starttages=20gek=C3=BCrzt=20?= =?UTF-8?q?=E2=80=93=20keine=20kilometerhohen=20Balken=20mehr=20bei=20tage?= =?UTF-8?q?s=C3=BCbergreifenden=20Terminen.=20Stundenh=C3=B6hen:=2036/54/7?= =?UTF-8?q?2/90=20=E2=86=92=2028/44/60/80px;=20Kompakt=20(28px)=20zeigt=20?= =?UTF-8?q?24h=20=3D=20672px.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 8 ++++---- frontend/js/calendar.js | 6 +++--- frontend/js/utils.js | 2 +- frontend/js/views/week.js | 4 +++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 3d1ef86..2c04d89 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -494,10 +494,10 @@

Stundenhöhe (Wochen- & Tagesansicht)

Wie viel Platz eine Stunde in der Zeitrasteransicht einnimmt

- - - - + + + +

Ausgeblendete Kalender

diff --git a/frontend/js/calendar.js b/frontend/js/calendar.js index cb8566b..38e0488 100644 --- a/frontend/js/calendar.js +++ b/frontend/js/calendar.js @@ -227,7 +227,7 @@ function renderView() { showEventPopup, false, weekStartDay, - state.settings.hour_height || 54 + state.settings.hour_height || 44 ); } else if (state.currentView === 'day') { renderWeek(container, state.currentDate, evs, @@ -235,7 +235,7 @@ function renderView() { showEventPopup, true, weekStartDay, - state.settings.hour_height || 54 + state.settings.hour_height || 44 ); } else if (state.currentView === 'quarter') { renderQuarter(container, state.currentDate, evs, @@ -1527,7 +1527,7 @@ function bindSettingsModal() { dim_past_events: document.getElementById('cfg-dim-past').checked, text_contrast: getActive('cfg-text-contrast') || 3, line_contrast: getActive('cfg-line-contrast') || 3, - hour_height: getActive('cfg-hour-height') || 54, + hour_height: getActive('cfg-hour-height') || 44, language: document.getElementById('cfg-language').value, }; try { diff --git a/frontend/js/utils.js b/frontend/js/utils.js index 7f5caa7..58a151a 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -92,7 +92,7 @@ export function applyTheme(settings) { root.style.setProperty('--border', lc.border); root.style.setProperty('--border-light', lc.light); - const hh = settings.hour_height || 54; + const hh = settings.hour_height || 44; root.style.setProperty('--hour-h', hh + 'px'); } diff --git a/frontend/js/views/week.js b/frontend/js/views/week.js index d0d7203..eed4c3f 100644 --- a/frontend/js/views/week.js +++ b/frontend/js/views/week.js @@ -74,7 +74,9 @@ export function renderWeek(container, currentDate, events, onSlotClick, onEventC const s = new Date(ev.start); const e = new Date(ev.end); const top = s.getHours() * hourH + s.getMinutes() * hourH / 60; - const height = Math.max(20, (e - s) / 60000 * hourH / 60); + const dayEnd = new Date(s); dayEnd.setHours(24, 0, 0, 0); + const clampedEnd = e > dayEnd ? dayEnd : e; + const height = Math.max(20, (clampedEnd - s) / 60000 * hourH / 60); const left = (col / cols) * 100; const width = (1 / cols) * 100 - 0.5; const color = ev.color || ev.calendarColor || '#4285f4';