📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
UX fixes
Blue Mouse4a98612403b4
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsxindex eef3296b6..6abf479ab 100644--- a/web/app/pages/Project/View/ViewProject.tsx+++ b/web/app/pages/Project/View/ViewProject.tsx@@ -2441,7 +2441,20 @@ const ViewProject = () => {setSearchParams(newSearchParams)}+ // Detect touch-capable devices (mobile/tablets) to avoid accidental zoom while scrolling+ const isTouchDevice = useMemo(() => {+ if (typeof window === 'undefined') return false+ const hasTouchEvent = 'ontouchstart' in window+ const hasMaxTouchPoints = typeof navigator !== 'undefined' && navigator.maxTouchPoints > 0+ const coarsePointer = window.matchMedia ? window.matchMedia('(pointer: coarse)').matches : false+ return hasTouchEvent || hasMaxTouchPoints || coarsePointer+ }, [])+const shouldEnableZoom = useMemo(() => {+ if (isTouchDevice) {+ return false+ }+if (period !== 'custom' || !dateRange) {return true}@@ -2449,7 +2462,7 @@ const ViewProject = () => {// Enable zoom only if the range is more than 1 dayconst daysDiff = Math.ceil((dateRange[1].getTime() - dateRange[0].getTime()) / (1000 * 3600 * 24))return daysDiff > 1- }, [period, dateRange])+ }, [period, dateRange, isTouchDevice])const getFilterLink = (column: string, value: string): LinkProps['to'] => {const isFilterActive = filters.findIndex((filter) => filter.column === column && filter.filter === value) >= 0diff --git a/web/app/ui/Modal.tsx b/web/app/ui/Modal.tsxindex 412dedc59..a05ddec6e 100644--- a/web/app/ui/Modal.tsx+++ b/web/app/ui/Modal.tsx@@ -50,7 +50,7 @@ const Modal = ({submitDisabled,overflowVisible,}: ModalProps) => (- <Dialog className={cx('relative z-10', className)} open={isOpened} onClose={onClose}>+ <Dialog className={cx('relative z-40', className)} open={isOpened} onClose={onClose}><DialogBackdroptransitionclassName='fixed inset-0 bg-gray-500/75 transition-opacity data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in'