Skip to content

📈 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!

More monospaced fonts

Blue Mousec08981199e80
diff --git a/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx b/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
index 3c4db21f6..2908a8abb 100644
--- a/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
+++ b/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
@@ -1,4 +1,4 @@
-import React, { useMemo, memo, useState, useEffect } from 'react'
+import React, { useMemo, useState, useEffect } from 'react'
import dayjs from 'dayjs'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
@@ -16,6 +16,7 @@ import {
ExclamationTriangleIcon,
XCircleIcon,
} from '@heroicons/react/24/outline'
+import cx from 'clsx'
import routes from '~/utils/routes'
import Button from '~/ui/Button'
@@ -28,9 +29,10 @@ import { Alerts } from '~/lib/models/Alerts'
import Loader from '~/ui/Loader'
import Pagination from '~/ui/Pagination'
import { Trash2Icon, BellRingIcon } from 'lucide-react'
+import { useViewProjectContext } from '../../View/ViewProject'
-const Separator = () => (
- <svg viewBox='0 0 2 2' className='h-0.5 w-0.5 flex-none fill-gray-400'>
+const Separator = ({ className }: { className?: string }) => (
+ <svg viewBox='0 0 2 2' className={cx('h-0.5 w-0.5 flex-none fill-gray-400', className)}>
<circle cx={1} cy={1} r={1} />
</svg>
)
@@ -91,17 +93,17 @@ const AlertCard = ({
<>
<li
onClick={() => openAlert(id)}
- className='min-h-[120px] cursor-pointer overflow-hidden rounded-xl border border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-slate-800/25 dark:bg-[#162032] dark:hover:bg-slate-800'
+ className='min-h-[120px] cursor-pointer overflow-hidden rounded-xl border border-gray-200 bg-gray-50 font-mono hover:bg-gray-100 dark:border-slate-800/25 dark:bg-[#162032] dark:hover:bg-slate-800'
>
<div className='px-4 py-4'>
<div className='flex justify-between'>
<div>
- <p className='flex items-center gap-x-2 text-lg text-slate-900 dark:text-gray-50'>
- <span className='font-semibold'>{name}</span>
- <Separator />
- <span>{queryMetricTMapping[queryMetric]}</span>
+ <p className='flex items-baseline gap-x-2 text-lg text-slate-900 dark:text-gray-50'>
+ <span className='text-base font-semibold'>{name}</span>
+ <Separator className='self-center' />
+ <span className='text-sm'>{queryMetricTMapping[queryMetric]}</span>
</p>
- <p className='text-base text-slate-900 dark:text-gray-50'>
+ <p className='text-sm text-slate-900 dark:text-gray-50'>
{lastTriggered
? t('alert.lastTriggeredOn', {
date:
@@ -170,7 +172,7 @@ const AddAlert = ({ handleNewAlert, isLimitReached }: AddAlertProps) => {
) : (
<PlusCircleIcon className='mx-auto h-12 w-12 text-gray-400 group-hover:text-gray-500 dark:text-gray-200 group-hover:dark:text-gray-400' />
)}
- <span className='mt-2 block text-sm font-semibold text-gray-900 dark:text-gray-50 group-hover:dark:text-gray-400'>
+ <span className='mt-2 block font-mono text-sm font-semibold text-gray-900 dark:text-gray-50 group-hover:dark:text-gray-400'>
{t('alert.add')}
</span>
</div>
@@ -178,11 +180,8 @@ const AddAlert = ({ handleNewAlert, isLimitReached }: AddAlertProps) => {
)
}
-interface ProjectAlertsProps {
- projectId: string
-}
-
-const ProjectAlerts = ({ projectId }: ProjectAlertsProps) => {
+const ProjectAlerts = () => {
+ const { projectId } = useViewProjectContext()
const { t } = useTranslation()
const { user, authenticated } = useSelector((state: StateType) => state.auth)
const [isPaidFeatureOpened, setIsPaidFeatureOpened] = useState(false)
@@ -321,10 +320,10 @@ const ProjectAlerts = ({ projectId }: ProjectAlertsProps) => {
<BellRingIcon className='mr-2 h-8 w-8' strokeWidth={1.5} />
<p className='text-3xl font-bold'>{t('dashboard.alerts')}</p>
</div>
- <p className='mt-2 text-lg whitespace-pre-wrap text-gray-100'>{t('dashboard.alertsDesc')}</p>
+ <p className='mt-2 font-mono text-sm whitespace-pre-wrap text-gray-100'>{t('dashboard.alertsDesc')}</p>
<Button
onClick={handleNewAlert}
- className='mt-6 rounded-md border border-transparent bg-white px-3 py-2 text-base font-medium text-gray-700 hover:bg-indigo-50 md:px-4'
+ className='mt-6 rounded-md border border-transparent bg-white px-3 py-2 font-mono text-sm font-medium text-gray-700 hover:bg-indigo-50 md:px-4'
secondary
large
>
@@ -367,4 +366,4 @@ const ProjectAlerts = ({ projectId }: ProjectAlertsProps) => {
)
}
-export default memo(ProjectAlerts)
+export default ProjectAlerts
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsx
index 56d9071c6..31c551c80 100644
--- a/web/app/pages/Project/View/ViewProject.tsx
+++ b/web/app/pages/Project/View/ViewProject.tsx
@@ -3616,10 +3616,12 @@ const ViewProject = () => {
<BellRingIcon className='mr-2 h-8 w-8' strokeWidth={1.5} />
<p className='text-3xl font-bold'>{t('dashboard.alerts')}</p>
</div>
- <p className='mt-2 text-lg whitespace-pre-wrap text-gray-100'>{t('dashboard.alertsDesc')}</p>
+ <p className='mt-2 font-mono text-sm whitespace-pre-wrap text-gray-100'>
+ {t('dashboard.alertsDesc')}
+ </p>
<Link
to={routes.signup}
- className='mt-6 inline-block rounded-md border border-transparent bg-white px-3 py-2 text-base font-medium text-gray-700 select-none hover:bg-indigo-50'
+ className='mt-6 rounded-md border border-transparent bg-white px-3 py-2 font-mono text-sm font-medium text-slate-900 hover:bg-indigo-50 md:px-4'
aria-label={t('titles.signup')}
>
{t('common.getStarted')}
@@ -3651,19 +3653,21 @@ const ViewProject = () => {
<FilterIcon className='mr-2 h-8 w-8' strokeWidth={1.5} />
<p className='text-3xl font-bold'>{t('dashboard.funnels')}</p>
</div>
- <p className='mt-2 text-lg whitespace-pre-wrap text-gray-100'>{t('dashboard.funnelsDesc')}</p>
+ <p className='mt-2 font-mono text-sm whitespace-pre-wrap text-gray-100'>
+ {t('dashboard.funnelsDesc')}
+ </p>
{authenticated ? (
<button
type='button'
onClick={() => setIsNewFunnelOpened(true)}
- className='mt-6 inline-block rounded-md border border-transparent bg-white px-3 py-2 text-base font-medium text-gray-700 select-none hover:bg-indigo-50'
+ className='mt-6 rounded-md border border-transparent bg-white px-3 py-2 font-mono text-sm font-medium text-slate-900 hover:bg-indigo-50 md:px-4'
>
{t('dashboard.newFunnel')}
</button>
) : (
<Link
to={routes.signup}
- className='mt-6 inline-block rounded-md border border-transparent bg-white px-3 py-2 text-base font-medium text-gray-700 select-none hover:bg-indigo-50'
+ className='mt-6 rounded-md border border-transparent bg-white px-3 py-2 font-mono text-sm font-medium text-slate-900 hover:bg-indigo-50 md:px-4'
aria-label={t('titles.signup')}
>
{t('common.getStarted')}
@@ -4043,7 +4047,7 @@ const ViewProject = () => {
</>
)}
{activeTab === PROJECT_TABS.alerts && project.role === 'owner' && authenticated && (
- <ProjectAlertsView projectId={id} />
+ <ProjectAlertsView />
)}
{analyticsLoading && (activeTab === PROJECT_TABS.traffic || activeTab === PROJECT_TABS.performance) && (
<Loader />
diff --git a/web/app/pages/Project/View/components/FunnelsList.tsx b/web/app/pages/Project/View/components/FunnelsList.tsx
index 8765bc1f4..0e19cf666 100644
--- a/web/app/pages/Project/View/components/FunnelsList.tsx
+++ b/web/app/pages/Project/View/components/FunnelsList.tsx
@@ -46,7 +46,7 @@ const FunnelCard = ({
>
<div className='px-4 py-4'>
<div className='flex items-center justify-between'>
- <p className='truncate text-lg font-semibold text-slate-900 dark:text-gray-50'>{funnel.name}</p>
+ <p className='truncate font-mono text-base font-semibold text-slate-900 dark:text-gray-50'>{funnel.name}</p>
<div className='flex items-center gap-2'>
<button
type='button'
@@ -96,7 +96,7 @@ const AddFunnel = ({ openFunnelSettings }: AddFunnelProps) => {
>
<div>
<PlusCircleIcon className='mx-auto h-12 w-12 text-gray-400 group-hover:text-gray-500 dark:text-gray-200 group-hover:dark:text-gray-400' />
- <span className='mt-2 block text-sm font-semibold text-gray-900 dark:text-gray-50 group-hover:dark:text-gray-400'>
+ <span className='mt-2 block font-mono text-sm font-semibold text-gray-900 dark:text-gray-50 group-hover:dark:text-gray-400'>
{t('dashboard.newFunnel')}
</span>
</div>
diff --git a/web/app/pages/Project/View/components/NoEvents.tsx b/web/app/pages/Project/View/components/NoEvents.tsx
index f3485f73c..740ec016c 100644
--- a/web/app/pages/Project/View/components/NoEvents.tsx
+++ b/web/app/pages/Project/View/components/NoEvents.tsx
@@ -21,8 +21,8 @@ const NoEvents = ({ filters, filterHandler, onChangeExclusive, resetActiveTabFil
return (
<div className='mt-5 flex flex-col py-6 sm:px-6 lg:px-8'>
<div className='mx-auto w-full max-w-7xl text-gray-900 dark:text-gray-50'>
- <h2 className='my-3 text-center text-4xl leading-tight'>{t('project.noEvTitle')}</h2>
- <h3 className='mb-8 text-center text-2xl leading-snug'>{t('project.noEvContent')}</h3>
+ <h2 className='my-3 text-center text-4xl leading-tight font-semibold'>{t('project.noEvTitle')}</h2>
+ <h3 className='mb-8 text-center font-mono text-2xl leading-snug'>{t('project.noEvContent')}</h3>
</div>
</div>
)
@@ -40,8 +40,8 @@ const NoEvents = ({ filters, filterHandler, onChangeExclusive, resetActiveTabFil
</div>
<div className='mt-5 flex flex-col py-6 sm:px-6 lg:px-8'>
<div className='mx-auto w-full max-w-7xl text-gray-900 dark:text-gray-50'>
- <h2 className='my-3 text-center text-4xl leading-tight'>{t('project.noEvTitle')}</h2>
- <h3 className='mb-8 text-center text-2xl leading-snug'>{t('project.noEventsFiltersDesc')}</h3>
+ <h2 className='my-3 text-center text-4xl leading-tight font-semibold'>{t('project.noEvTitle')}</h2>
+ <h3 className='mb-8 text-center font-mono text-2xl leading-snug'>{t('project.noEventsFiltersDesc')}</h3>
</div>
</div>
</>
diff --git a/web/app/pages/Project/View/components/WaitingForAnError.tsx b/web/app/pages/Project/View/components/WaitingForAnError.tsx
index 014adbed9..2886f133f 100644
--- a/web/app/pages/Project/View/components/WaitingForAnError.tsx
+++ b/web/app/pages/Project/View/components/WaitingForAnError.tsx
@@ -19,7 +19,7 @@ const WaitingForAnError = () => {
<h1 className='text-4xl font-extrabold tracking-tight text-gray-900 sm:text-5xl dark:text-gray-50'>
{t('project.waitingError.title')}
</h1>
- <p className='mt-2 max-w-[80ch] text-base whitespace-pre-line text-gray-700 dark:text-gray-300'>
+ <p className='mt-4 max-w-[100ch] font-mono text-sm whitespace-pre-line text-gray-800 dark:text-gray-200'>
<Trans
t={t}
i18nKey='project.waitingError.desc'
diff --git a/web/app/pages/Project/View/components/WaitingForAnEvent.tsx b/web/app/pages/Project/View/components/WaitingForAnEvent.tsx
index e0b2d361f..ec0405ae3 100644
--- a/web/app/pages/Project/View/components/WaitingForAnEvent.tsx
+++ b/web/app/pages/Project/View/components/WaitingForAnEvent.tsx
@@ -28,7 +28,7 @@ const WaitingForAnEvent = ({ project }: WaitingForAnEventProps) => {
<h1 className='text-4xl font-extrabold tracking-tight text-gray-900 sm:text-5xl dark:text-gray-50'>
{t('project.waiting.title')}
</h1>
- <p className='mt-2 max-w-prose text-base whitespace-pre-line text-gray-700 dark:text-gray-300'>
+ <p className='mt-4 max-w-[100ch] font-mono text-sm whitespace-pre-line text-gray-800 dark:text-gray-200'>
<Trans
// @ts-ignore
t={t}