mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-08 11:18:53 +00:00
ed8fa7e11f
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>
25 lines
693 B
TypeScript
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}</>;
|
|
}
|