Files
certctl/web/src/components/AuthGate.tsx
T
Shankar ed8fa7e11f feat: dashboard theme overhaul — light content area with branded teal sidebar
Complete frontend visual redesign using certctl logo color palette:
- Deep teal sidebar (#0c2e25) with prominent centered logo (64px in white pill)
- Light content area (#f0f4f8) with white cards and visible borders
- Brand colors from logo: teal (#2ea88f), blue (#3b7dd8), orange (#e8873a), green (#4ebe6e)
- Inter + JetBrains Mono typography, colored stat card top borders
- All 17 pages + 7 components updated (25 files, ~700 lines changed)
- 15 new dashboard screenshots replacing old dark theme screenshots
- Prometheus metrics e2e test added, integration test mock fixes
- Docs updated: architecture.md theme description, testing-guide.md DNS-PERSIST-01 coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 23:27:42 -04:00

25 lines
693 B
TypeScript

import type { ReactNode } from 'react';
import { useAuth } from './AuthProvider';
import LoginPage from '../pages/LoginPage';
export default function AuthGate({ children }: { children: ReactNode }) {
const { loading, authRequired, authenticated } = useAuth();
if (loading) {
return (
<div className="min-h-screen bg-page flex items-center justify-center">
<div className="text-center">
<h1 className="text-2xl font-bold text-brand-500 mb-2">certctl</h1>
<p className="text-sm text-ink-muted">Connecting...</p>
</div>
</div>
);
}
if (authRequired && !authenticated) {
return <LoginPage />;
}
return <>{children}</>;
}