feat(frontend): add lead icons to mission detail section headers
TacticalFrame takes an optional 'icon' prop rendered before the classification label in the strip. Each of the 11 headers now passes an icon, reused from its section's existing component icon for coherence: RATING star, DETAILS clipboard, THREAT radar, BRIEFING doc, OBJECTIVES crosshair, FACTIONS shield, ROLES users, COMMAND branch, SIGN-UPS user-plus, LOGISTICS truck, COMMS radio.
This commit is contained in:
parent
bb7d7337ed
commit
0a8246ebcc
2 changed files with 29 additions and 2 deletions
|
|
@ -9,11 +9,21 @@ import {
|
|||
CalendarDaysIcon,
|
||||
ChevronRightIcon,
|
||||
ClockIcon,
|
||||
ClipboardListIcon,
|
||||
CrosshairIcon,
|
||||
FileTextIcon,
|
||||
FlagIcon,
|
||||
GitBranchIcon,
|
||||
MapPinIcon,
|
||||
RadarIcon,
|
||||
RadioIcon,
|
||||
ServerIcon,
|
||||
ShieldIcon,
|
||||
StarIcon,
|
||||
TruckIcon,
|
||||
UserIcon,
|
||||
UserPlusIcon,
|
||||
UsersIcon,
|
||||
} from "lucide-react";
|
||||
import { Item, ItemContent, ItemHeader, ItemTitle } from "@/components/ui/item";
|
||||
import { ClientDate } from "@/components/frontend/ClientDate";
|
||||
|
|
@ -512,6 +522,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
<div className="xl:col-span-2 flex flex-col gap-6">
|
||||
<TacticalFrame
|
||||
classification="OPERATION // RATING"
|
||||
icon={StarIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -525,6 +536,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // DETAILS"
|
||||
icon={ClipboardListIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -560,6 +572,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // THREAT"
|
||||
icon={RadarIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -571,6 +584,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // BRIEFING"
|
||||
icon={FileTextIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -582,6 +596,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // OBJECTIVES"
|
||||
icon={CrosshairIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -596,6 +611,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // FACTIONS"
|
||||
icon={ShieldIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -604,6 +620,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // ROLES"
|
||||
icon={UsersIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -617,6 +634,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
{commandChainEditor && (
|
||||
<TacticalFrame
|
||||
classification="OPERATION // COMMAND"
|
||||
icon={GitBranchIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -633,6 +651,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // SIGN-UPS"
|
||||
icon={UserPlusIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -649,6 +668,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // LOGISTICS"
|
||||
icon={TruckIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
@ -657,6 +677,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // COMMS"
|
||||
icon={RadioIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import type { ReactNode } from "react";
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/**
|
||||
|
|
@ -24,6 +25,8 @@ interface TacticalFrameProps {
|
|||
classification: string;
|
||||
/** Right strip label, e.g. "REF 042". Omit to hide. */
|
||||
refCode?: string;
|
||||
/** Optional lead icon rendered before the classification label in the strip. */
|
||||
icon?: LucideIcon;
|
||||
children: ReactNode;
|
||||
/** Optional permanent readout bar pinned to the bottom edge. */
|
||||
footer?: ReactNode;
|
||||
|
|
@ -38,12 +41,14 @@ interface TacticalFrameProps {
|
|||
export function TacticalFrame({
|
||||
classification,
|
||||
refCode,
|
||||
icon,
|
||||
children,
|
||||
footer,
|
||||
brackets = true,
|
||||
grow = true,
|
||||
className,
|
||||
}: TacticalFrameProps) {
|
||||
const Icon = icon;
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
|
|
@ -67,8 +72,9 @@ export function TacticalFrame({
|
|||
aria-hidden="true"
|
||||
className="relative z-20 flex items-center justify-between gap-2 border-b border-white/15 bg-black/50 px-4 py-1.5 backdrop-blur-sm"
|
||||
>
|
||||
<span className="truncate font-mono text-[9px] uppercase tracking-widest text-white/60">
|
||||
{classification}
|
||||
<span className="flex items-center gap-1.5 font-mono text-[9px] uppercase tracking-widest text-white/60">
|
||||
{Icon ? <Icon className="size-3 shrink-0" /> : null}
|
||||
<span className="truncate">{classification}</span>
|
||||
</span>
|
||||
{refCode ? (
|
||||
<span className="shrink-0 font-mono text-[9px] uppercase tracking-widest text-white/60">
|
||||
|
|
|
|||
Loading…
Reference in a new issue