Pages declare brief tours in code, keyed to stable data-tour anchors. The layout resolves each visitor's access signals (intelligence and logistics qualifications, admin-panel access, feature flags) and step filtering hides what a user cannot reach, mirroring the sidebar. A tour auto-starts the first time a browser visits its page; dismissals are remembered per browser in localStorage. The header gains a replay control for on-demand runs on toured routes, the tour card gains Skip all tours on this device to opt a browser out of auto-starts, and the Account page holds the re-enable toggle. The card and spotlight get a distinct overlay treatment (glow, accent strip, outlined target).
22 lines
958 B
TypeScript
22 lines
958 B
TypeScript
import { SidebarTrigger } from "@/components/ui/sidebar";
|
|
import { Separator } from "@/components/ui/separator";
|
|
import { NotificationsBell } from "@/components/frontend/notifications/NotificationsBell";
|
|
import { TourReplayButton } from "@/components/frontend/tours/TourReplayButton";
|
|
import { Command } from "lucide-react";
|
|
|
|
export const SiteHeader = () => {
|
|
return (
|
|
<header className="flex h-16 shrink-0 items-center gap-2 border-b px-4">
|
|
<SidebarTrigger className="-ml-1" />
|
|
<Separator orientation="vertical" className="mr-2 data-[orientation=vertical]:h-4" />
|
|
<div className="flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/50 px-2 py-1 text-xs text-muted-foreground select-none">
|
|
<Command className="h-3 w-3" />
|
|
<span>K</span>
|
|
</div>
|
|
<div className="ml-auto flex items-center gap-1">
|
|
<TourReplayButton />
|
|
<NotificationsBell />
|
|
</div>
|
|
</header>
|
|
);
|
|
};
|