diff --git a/src/components/branding/SecuirdLogo.tsx b/src/components/branding/SecuirdLogo.tsx index aa80334..a77c51c 100644 --- a/src/components/branding/SecuirdLogo.tsx +++ b/src/components/branding/SecuirdLogo.tsx @@ -7,9 +7,8 @@ interface SecuirdLogoProps { } /** - * Secuird Logo - Abstract gate/doorway mark - * Represents controlled entry and policy enforcement - * Two vertical pillars forming a gateway with negative space + * Secuird Logo — Abstract gate/doorway mark + * Uses CSS variables so the color automatically adapts to the active theme. */ export function SecuirdLogo({ size = "md", @@ -22,6 +21,8 @@ export function SecuirdLogo({ lg: "w-12 h-12", }; + // Tailwind classes resolve to hsl(var(--primary)) / hsl(var(--sidebar-primary)) + // which pick up the injected --theme-primary / --theme-sidebar-primary values. const bgClasses = { default: "bg-primary", light: "bg-sidebar-primary", @@ -48,28 +49,10 @@ export function SecuirdLogo({ size === "sm" ? "w-4 h-4" : size === "md" ? "w-5 h-5" : "w-6 h-6" )} > - {/* Abstract gate - two pillars with archway */} - - - - {/* Keyhole/entry indicator */} - + + + + ); diff --git a/src/components/branding/ThemeIndicator.tsx b/src/components/branding/ThemeIndicator.tsx new file mode 100644 index 0000000..8ab13a1 --- /dev/null +++ b/src/components/branding/ThemeIndicator.tsx @@ -0,0 +1,31 @@ +import { config } from "@/config"; + +interface ThemeIndicatorProps { + showBanner?: boolean; + className?: string; +} + +/** + * Visual theme indicator — solid-colored banner for dev/preprod environments. + */ +export function ThemeIndicator({ showBanner = true }: ThemeIndicatorProps) { + const theme = config.theme.name; + const appName = config.app.name; + + if (theme === "default") return null; + + const labels: Record = { + dev: "Development Environment", + preprod: "Staging / Pre-Production", + }; + + if (showBanner) { + return
{labels[theme] || theme} — {appName}
; + } + + return ( + + {labels[theme] || theme} + + ); +} diff --git a/src/components/layouts/AuthenticatedLayout.tsx b/src/components/layouts/AuthenticatedLayout.tsx index 73ab8d6..b192e7e 100644 --- a/src/components/layouts/AuthenticatedLayout.tsx +++ b/src/components/layouts/AuthenticatedLayout.tsx @@ -3,11 +3,13 @@ import { SidebarProvider } from "@/components/ui/sidebar"; import { AppSidebar } from "@/components/navigation/AppSidebar"; import { TopBar } from "@/components/navigation/TopBar"; import ApiDevTools from "@/components/dev/ApiDevTools"; +import { ThemeIndicator } from "@/components/branding/ThemeIndicator"; export default function AuthenticatedLayout() { return ( -
+ +
diff --git a/src/components/layouts/MarketingLayout.tsx b/src/components/layouts/MarketingLayout.tsx index e5998f2..d957dbc 100644 --- a/src/components/layouts/MarketingLayout.tsx +++ b/src/components/layouts/MarketingLayout.tsx @@ -1,16 +1,17 @@ import { Link, Outlet, useLocation } from "react-router-dom"; import { SecuirdLogo as GatehouseLogo } from "@/components/branding/SecuirdLogo"; +import { ThemeIndicator } from "@/components/branding/ThemeIndicator"; import { Button } from "@/components/ui/button"; import { config } from "@/config"; import { cn } from "@/lib/utils"; import { -Shield, -Key, -CreditCard, -Play, -Lock, -Menu, -X + Shield, + Key, + CreditCard, + Play, + Lock, + Menu, + X } from "lucide-react"; import { useState } from "react"; @@ -29,8 +30,11 @@ const [mobileMenuOpen, setMobileMenuOpen] = useState(false); return (
+ {/* Theme indicator banner for dev/staging */} + + {/* Header */} -
+