diff --git a/apps/web/src/app/[locale]/(auth)/admin/integrations/admin-integrations-content.tsx b/apps/web/src/app/[locale]/(auth)/admin/integrations/admin-integrations-content.tsx index b3daad3..3943ea6 100644 --- a/apps/web/src/app/[locale]/(auth)/admin/integrations/admin-integrations-content.tsx +++ b/apps/web/src/app/[locale]/(auth)/admin/integrations/admin-integrations-content.tsx @@ -16,6 +16,10 @@ import { Eye, EyeOff, Loader2, + Plug, + CheckCircle2, + AlertCircle, + LayoutGrid, type LucideIcon, } from 'lucide-react'; @@ -41,7 +45,7 @@ import { } from '@/components/ui/select'; import { Skeleton } from '@/components/ui/skeleton'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; -import { IntegrationStatusBadge } from '@/components/integrations'; +import { IntegrationStatusBadge, IntegrationCard } from '@/components/integrations'; import { useAllIntegrationStatuses } from '@/hooks/integrations'; import { useCredentials, @@ -459,11 +463,14 @@ function IntegrationPanel({ integrationType }: IntegrationPanelProps) { * Lists each integration as a tab; each tab loads its own credential * state so queries are isolated and only triggered when the tab is visited. */ -export function AdminIntegrationsContent({ locale: _locale }: AdminIntegrationsContentProps) { +export function AdminIntegrationsContent({ locale }: AdminIntegrationsContentProps) { const t = useTranslations('integrations'); const tAdmin = useTranslations('admin'); const { data: integrations, isLoading } = useAllIntegrationStatuses(); + const connectedCount = integrations?.filter((i) => i.status === 'connected').length ?? 0; + const errorCount = integrations?.filter((i) => i.status === 'error').length ?? 0; + return (
{/* Header */} @@ -501,8 +508,12 @@ export function AdminIntegrationsContent({ locale: _locale }: AdminIntegrationsC ))}
) : ( - + + + + {t('overview')} + {integrations?.map((config) => { const meta = integrationMeta[config.type]; const Icon = meta.icon; @@ -515,6 +526,78 @@ export function AdminIntegrationsContent({ locale: _locale }: AdminIntegrationsC })} + {/* Overview tab */} + + + {/* Summary Stats */} +
+ + + {t('allIntegrations')} + + + +
{integrations?.length ?? 0}
+
+
+ + + + {t('connected')} + + + +
{connectedCount}
+
+
+ + + + {t('error')} + + + +
0 && 'text-destructive')}> + {errorCount} +
+
+
+
+ + {/* Integration Cards Grid */} + + {integrations?.map((config) => ( + + + + ))} + +
+
+ + {/* Individual integration tabs */} {integrations?.map((config) => (