fix(mobile): Zoom blocken, Long-Press, KW-Bubble, Swipe-Nav, Safe-Area
- Viewport: maximum-scale=1, user-scalable=no — kein Pinch-Zoom mehr - Profil-Dropdown öffnet wieder: overflow:hidden auf .topbar-right in der Mobile-Media-Query entfernt (hatte das absolut positionierte Dropdown abgeschnitten) - Long-Press auf Kalenderzellen markiert keinen Text mehr: user-select/touch-callout/tap-highlight in der ganzen Mobile-UI aus - Long-Press auf Avatar zeigt nicht "Bild speichern": -webkit-touch-callout:none + pointer-events:none auf <img> - Kalenderwochen erscheinen als kleine Bubble oben links in jeder Zeile statt als eigene 38px-Spalte - Status-Bar-Overlap im Settings-Modal behoben: safe-area-inset-top auf .settings-page-header und Modal-Header in der Mobile-Media-Query - Swipe links/rechts auf #view-container navigiert prev/next (≥60 px, überwiegend horizontal, < 700 ms) - Version v3 → v4 (auch SW-Cache) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,7 @@ export async function initCalendar() {
|
||||
bindHAAccountModal();
|
||||
bindSettingsModal();
|
||||
bindProfileModal();
|
||||
bindSwipeNavigation();
|
||||
handleHAOAuthReturn();
|
||||
}
|
||||
|
||||
@@ -755,6 +756,33 @@ function renderCalendarList() {
|
||||
});
|
||||
}
|
||||
|
||||
// ── Swipe navigation (mobile) ─────────────────────────────
|
||||
function bindSwipeNavigation() {
|
||||
const container = document.getElementById('view-container');
|
||||
if (!container) return;
|
||||
let startX = 0, startY = 0, startT = 0, active = false;
|
||||
container.addEventListener('touchstart', e => {
|
||||
if (e.touches.length !== 1) { active = false; return; }
|
||||
startX = e.touches[0].clientX;
|
||||
startY = e.touches[0].clientY;
|
||||
startT = Date.now();
|
||||
active = true;
|
||||
}, { passive: true });
|
||||
container.addEventListener('touchend', e => {
|
||||
if (!active) return;
|
||||
active = false;
|
||||
const t = e.changedTouches[0];
|
||||
const dx = t.clientX - startX;
|
||||
const dy = t.clientY - startY;
|
||||
const dt = Date.now() - startT;
|
||||
// Horizontal swipe: ≥ 60px, mostly horizontal, faster than 700ms
|
||||
if (Math.abs(dx) > 60 && Math.abs(dx) > Math.abs(dy) * 1.5 && dt < 700) {
|
||||
navigate(dx < 0 ? 1 : -1);
|
||||
fetchAndRender();
|
||||
}
|
||||
}, { passive: true });
|
||||
}
|
||||
|
||||
// ── Navigation ────────────────────────────────────────────
|
||||
function navigate(dir) {
|
||||
const d = state.currentDate;
|
||||
|
||||
Reference in New Issue
Block a user