📈 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
improve no projects found message if searching
Blue Mouse455a48779c76
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.tsindex 1abd8fcd5..a0466418b 100644--- a/web/app/lib/constants/index.ts+++ b/web/app/lib/constants/index.ts@@ -430,7 +430,7 @@ export const paddleLanguageMapping = {// Increase this counter every time some major change is done within localisation files// This will prevent cached version or raw locale strings being displayed in production-export const I18N_CACHE_BREAKER = 13+export const I18N_CACHE_BREAKER = 14export const roles: Role[] = ['admin', 'viewer']diff --git a/web/app/pages/Dashboard/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsxindex 355461420..ae4b5c3b4 100644--- a/web/app/pages/Dashboard/Dashboard.tsx+++ b/web/app/pages/Dashboard/Dashboard.tsx@@ -439,7 +439,7 @@ const Dashboard = () => {{() => (<>{_isEmpty(projects) ? (- <NoProjects onClick={onNewProject} />+ <NoProjects search={debouncedSearch} activeTab={activeTab} onClick={onNewProject} />) : (<divclassName={cx(diff --git a/web/app/pages/Dashboard/NoProjects.tsx b/web/app/pages/Dashboard/NoProjects.tsxindex 559a8543c..069dd9c2e 100644--- a/web/app/pages/Dashboard/NoProjects.tsx+++ b/web/app/pages/Dashboard/NoProjects.tsx@@ -4,14 +4,27 @@ import { Link } from '@remix-run/react'import { useTranslation } from 'react-i18next'import routes from '~/utils/routes'+import { DASHBOARD_TABS } from './Tabs'interface NoProjectsProps {onClick: (e: React.MouseEvent<HTMLAnchorElement>) => void+ activeTab: (typeof DASHBOARD_TABS)[number]['id']+ search: string}-export const NoProjects = ({ onClick }: NoProjectsProps) => {+export const NoProjects = ({ onClick, activeTab, search }: NoProjectsProps) => {const { t } = useTranslation('common')+ if (activeTab !== 'default' || search) {+ return (+ <div className='mt-5 flex flex-col py-6 sm:px-6 lg:px-8'>+ <div className='mx-auto w-full max-w-6xl text-gray-900 dark:text-gray-50'>+ <h3 className='mb-8 text-center text-xl leading-snug'>{t('dashboard.noProjectsForCriteria')}</h3>+ </div>+ </div>+ )+ }+return (<Linkto={routes.new_project}diff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex 1afbfa3c5..85bd5fad2 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -696,6 +696,7 @@"sortDateDesc": "Newest first","pageviewsDesc": "Most pageviews","pageviewsAsc": "Least pageviews",+ "noProjectsForCriteria": "No projects found for the selected criteria","lastVisitDesc": "Recently visited first","uptime": "Uptime","captcha": "CAPTCHA",