From ea7442db329d6634ceda8a7e4e8692057339cdc4 Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Wed, 8 Apr 2026 14:19:13 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Scroll-Navigation=20nur=20f=C3=BCr=20Mon?= =?UTF-8?q?at/Quartal,=20Stundenh=C3=B6hen=20reduziert=20Wheel-Scroll=20?= =?UTF-8?q?=C3=A4ndert=20Zeitraum=20jetzt=20nur=20noch=20in=20Monats-=20un?= =?UTF-8?q?d=20Quartalsansicht.=20In=20Wochen-,=20Tag-=20und=20Terminansic?= =?UTF-8?q?ht=20scrollt=20die=20Seite=20normal.=20Stundenh=C3=B6hen:=2040/?= =?UTF-8?q?60/80/100=20=E2=86=92=2036/54/72/90px;=20Kompakt=20(36px)=20zei?= =?UTF-8?q?gt=2024h=20auf=201080p=20ohne=20Scrollen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 8 ++++---- frontend/js/calendar.js | 10 +++++----- frontend/js/utils.js | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 7bc3514..3d1ef86 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 081145c..cb8566b 100644 --- a/frontend/js/calendar.js +++ b/frontend/js/calendar.js @@ -227,7 +227,7 @@ function renderView() { showEventPopup, false, weekStartDay, - state.settings.hour_height || 60 + state.settings.hour_height || 54 ); } else if (state.currentView === 'day') { renderWeek(container, state.currentDate, evs, @@ -235,7 +235,7 @@ function renderView() { showEventPopup, true, weekStartDay, - state.settings.hour_height || 60 + state.settings.hour_height || 54 ); } else if (state.currentView === 'quarter') { renderQuarter(container, state.currentDate, evs, @@ -653,15 +653,15 @@ function bindTopbar() { document.getElementById('btn-settings').onclick = openSettingsModal; document.getElementById('btn-create-event').onclick = () => openNewEventModal(new Date()); - // Mouse wheel / trackpad scroll navigation (500ms cooldown = 1 nav per gesture) + // Mouse wheel / trackpad scroll navigation – only for month & quarter let _wheelLast = 0; document.getElementById('view-container').addEventListener('wheel', e => { + if (state.currentView !== 'month' && state.currentView !== 'quarter') return; e.preventDefault(); const now = Date.now(); if (now - _wheelLast < 500) return; _wheelLast = now; const dir = e.deltaY > 0 ? 1 : -1; - if (state.currentView === 'agenda') return; if (state.currentView === 'month') { state.currentDate = new Date(state.currentDate); state.currentDate.setDate(state.currentDate.getDate() + dir * 7); @@ -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') || 60, + hour_height: getActive('cfg-hour-height') || 54, language: document.getElementById('cfg-language').value, }; try { diff --git a/frontend/js/utils.js b/frontend/js/utils.js index 8219e07..7f5caa7 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 || 60; + const hh = settings.hour_height || 54; root.style.setProperty('--hour-h', hh + 'px'); }