feat(frontend): restore frame section titles and color-code faction types
TacticalFrame classification labels are back on all 11 mission-detail frames (the earlier label-less pass is reverted). Faction type is now rendered as a friendly, type-colored tag (Player/Major/Minor/Corporation/ Special) instead of the raw database value.
This commit is contained in:
parent
9db57a465c
commit
e070d2b586
2 changed files with 30 additions and 1 deletions
|
|
@ -521,6 +521,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
{/* ── Main Content (2/3) ──────────────────────────── */}
|
||||
<div className="xl:col-span-2 flex flex-col gap-6">
|
||||
<TacticalFrame
|
||||
classification="OPERATION // RATING"
|
||||
icon={StarIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -534,6 +535,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // DETAILS"
|
||||
icon={ClipboardListIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -569,6 +571,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // THREAT"
|
||||
icon={RadarIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -580,6 +583,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // BRIEFING"
|
||||
icon={FileTextIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -591,6 +595,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // OBJECTIVES"
|
||||
icon={CrosshairIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -605,6 +610,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // FACTIONS"
|
||||
icon={ShieldIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -613,6 +619,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // ROLES"
|
||||
icon={UsersIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -626,6 +633,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
|
||||
{commandChainEditor && (
|
||||
<TacticalFrame
|
||||
classification="OPERATION // COMMAND"
|
||||
icon={GitBranchIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -642,6 +650,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
)}
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // SIGN-UPS"
|
||||
icon={UserPlusIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -658,6 +667,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // LOGISTICS"
|
||||
icon={TruckIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
@ -666,6 +676,7 @@ export default async function MissionDetailPage({ params }: MissionDetailPagePro
|
|||
</TacticalFrame>
|
||||
|
||||
<TacticalFrame
|
||||
classification="OPERATION // COMMS"
|
||||
icon={RadioIcon}
|
||||
refCode={`REF ${refCodeFrom(mission.id)}`}
|
||||
grow={false}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,22 @@ const threatLevelColors: Record<string, string> = {
|
|||
hostile: "bg-red-500/20 text-red-400",
|
||||
};
|
||||
|
||||
const FACTION_TYPE_LABELS: Record<string, string> = {
|
||||
playerFaction: "Player Faction",
|
||||
majorFaction: "Major Faction",
|
||||
minorFaction: "Minor Faction",
|
||||
corporation: "Corporation",
|
||||
special: "Special",
|
||||
};
|
||||
|
||||
const FACTION_TYPE_COLORS: Record<string, string> = {
|
||||
playerFaction: "bg-amber-500/20 text-amber-300",
|
||||
majorFaction: "bg-indigo-500/20 text-indigo-300",
|
||||
minorFaction: "bg-muted/50 text-muted-foreground",
|
||||
corporation: "bg-cyan-500/20 text-cyan-300",
|
||||
special: "bg-violet-500/20 text-violet-300",
|
||||
};
|
||||
|
||||
export function MissionFactions({ factionsInvolved }: MissionFactionsProps) {
|
||||
if (!factionsInvolved || factionsInvolved.length === 0) {
|
||||
return (
|
||||
|
|
@ -59,7 +75,9 @@ export function MissionFactions({ factionsInvolved }: MissionFactionsProps) {
|
|||
</ItemHeader>
|
||||
{faction && (
|
||||
<ItemContent>
|
||||
<span className="text-xs text-muted-foreground">{faction.type}</span>
|
||||
<span className={`text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded ${FACTION_TYPE_COLORS[faction.type] ?? "bg-muted/50 text-muted-foreground"}`}>
|
||||
{FACTION_TYPE_LABELS[faction.type] ?? faction.type}
|
||||
</span>
|
||||
</ItemContent>
|
||||
)}
|
||||
</Item>
|
||||
|
|
|
|||
Loading…
Reference in a new issue