diff --git a/src/admin/AdminAppInsights.tsx b/src/admin/AdminAppInsights.tsx index 58286cda..c25fdd3b 100644 --- a/src/admin/AdminAppInsights.tsx +++ b/src/admin/AdminAppInsights.tsx @@ -7,6 +7,7 @@ import { } from '@/photo/db/query'; import AdminAppInsightsClient from './AdminAppInsightsClient'; import { APP_CONFIGURATION } from '@/app-core/config'; + export default async function AdminAppInsights() { const [ { count, dateRange }, diff --git a/src/admin/AdminAppInsightsClient.tsx b/src/admin/AdminAppInsightsClient.tsx index 9c755287..0e512f85 100644 --- a/src/admin/AdminAppInsightsClient.tsx +++ b/src/admin/AdminAppInsightsClient.tsx @@ -5,7 +5,9 @@ import Note from '@/components/Note'; import WarningNote from '@/components/WarningNote'; import { dateRangeForPhotos, PhotoDateRange } from '@/photo'; import clsx from 'clsx/lite'; +import { ReactNode } from 'react'; import { HiSparkles } from 'react-icons/hi'; +import { PiWarningBold } from 'react-icons/pi'; type Recommendation = 'fork' | @@ -52,15 +54,53 @@ export default function AdminAppInsightsClient({ {title} ; + const renderRow = (icon: ReactNode, children: ReactNode) => +
+
+ {icon} +
+
+ {children} +
+
; + return (
+
+ {renderRow( + , + 'This fork is 9 commits behind', + )} + {renderRow( + , + 'Consider enabling rate limiting to mitigate AI abuse', + )} + {renderRow( + , + // eslint-disable-next-line max-len + 'Consider forking this repository to receive new features and fixes', + )} + {renderRow( + , + 'Enable AI text generation in the app configuration', + )} +
{renderTitle('Code Observability')} {(fork || debug) && }> diff --git a/src/admin/github/GitHubForkStatusBadgeClient.tsx b/src/admin/github/GitHubForkStatusBadgeClient.tsx index 7f1e0fd6..45a79750 100644 --- a/src/admin/github/GitHubForkStatusBadgeClient.tsx +++ b/src/admin/github/GitHubForkStatusBadgeClient.tsx @@ -59,10 +59,7 @@ export default function GitHubForkStatusBadgeClient({ classNameForStyle(), )}> {!label - ? + ? : } {label ?? 'Checking'}
diff --git a/tailwind.css b/tailwind.css index d02e2a8b..7648abc5 100644 --- a/tailwind.css +++ b/tailwind.css @@ -124,6 +124,10 @@ @apply border border-gray-200 dark:border-gray-700 } +@utility divide-main { + @apply + divide-gray-200 dark:divide-gray-700 +} /* Background */ @utility bg-main { @apply