📈 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
nicer live visitors dropdown status indicators
Blue Mouse1b57206a0449
diff --git a/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx b/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsxindex 34961ef64..0b2bbcb25 100644--- a/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx+++ b/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx@@ -8,6 +8,7 @@ import { getLiveVisitorsInfo, GetLiveVisitorsInfo } from '~/api'import { PROJECT_TABS } from '~/lib/constants'import Flag from '~/ui/Flag'import PulsatingCircle from '~/ui/icons/PulsatingCircle'+import Spin from '~/ui/icons/Spin'import OutsideClickHandler from '~/ui/OutsideClickHandler'import { useCurrentProject, useProjectPassword } from '../../../../providers/CurrentProjectProvider'@@ -70,7 +71,13 @@ const LiveVisitorsDropdown = () => {<div className='flex w-full flex-col p-2'><p className='text-sm font-semibold text-gray-900 dark:text-gray-50'>{t('dashboard.liveVisitors')}</p>{isLoading ? (- <p className='text-sm text-gray-900 dark:text-gray-50'>{t('common.loading')}</p>+ <p className='mt-2 flex items-center text-sm text-gray-900 dark:text-gray-50'>+ <Spin className='ml-0' />++ {t('common.loading')}+ </p>+ ) : liveInfo.length === 0 ? (+ <p className='mt-2 text-sm text-gray-900 dark:text-gray-50'>{t('project.noData')}</p>) : (<div className='table w-full border-separate border-spacing-y-2'><div className='table-row-group'>diff --git a/web/app/ui/icons/Spin.tsx b/web/app/ui/icons/Spin.tsxindex 7d8dcd2b6..fcf7999ac 100644--- a/web/app/ui/icons/Spin.tsx+++ b/web/app/ui/icons/Spin.tsx@@ -1,4 +1,4 @@-import cx from 'clsx'+import { cn } from '~/utils/generic'interface SpinProps {className?: string@@ -7,7 +7,7 @@ interface SpinProps {const Spin = ({ className, alwaysLight }: SpinProps) => (<svg- className={cx(+ className={cn('mr-2 -ml-1 h-4 w-4 animate-spin text-slate-900 dark:text-white',{'text-slate-900 dark:text-white': !alwaysLight,