style(intelligence): reformat mission components and refine objective display
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
dcf8a03dea
commit
5f601e393d
3 changed files with 14 additions and 48 deletions
|
|
@ -33,14 +33,7 @@ interface MissionCardProps {
|
||||||
campaign: number | Campaign;
|
campaign: number | Campaign;
|
||||||
};
|
};
|
||||||
ownershipAndStatus: {
|
ownershipAndStatus: {
|
||||||
status:
|
status: "Concept" | "Planning" | "Ready" | "Scheduled" | "Active" | "Completed" | "Cancelled";
|
||||||
| "Concept"
|
|
||||||
| "Planning"
|
|
||||||
| "Ready"
|
|
||||||
| "Scheduled"
|
|
||||||
| "Active"
|
|
||||||
| "Completed"
|
|
||||||
| "Cancelled";
|
|
||||||
};
|
};
|
||||||
missionRoles?: {
|
missionRoles?: {
|
||||||
maxPlayers: number;
|
maxPlayers: number;
|
||||||
|
|
@ -72,9 +65,7 @@ const operationTypeLabels: Record<string, string> = {
|
||||||
|
|
||||||
export function MissionCard({ mission }: MissionCardProps) {
|
export function MissionCard({ mission }: MissionCardProps) {
|
||||||
const map =
|
const map =
|
||||||
typeof mission.classification.map === "object"
|
typeof mission.classification.map === "object" ? (mission.classification.map as Map) : null;
|
||||||
? (mission.classification.map as Map)
|
|
||||||
: null;
|
|
||||||
const campaign =
|
const campaign =
|
||||||
typeof mission.classification.campaign === "object"
|
typeof mission.classification.campaign === "object"
|
||||||
? (mission.classification.campaign as Campaign)
|
? (mission.classification.campaign as Campaign)
|
||||||
|
|
@ -103,9 +94,7 @@ export function MissionCard({ mission }: MissionCardProps) {
|
||||||
<CrosshairIcon />
|
<CrosshairIcon />
|
||||||
</ItemMedia>
|
</ItemMedia>
|
||||||
<ItemTitle className="flex flex-col">
|
<ItemTitle className="flex flex-col">
|
||||||
<span className="font-mono text-xs text-muted-foreground">
|
<span className="font-mono text-xs text-muted-foreground">{mission.codeName}</span>
|
||||||
{mission.codeName}
|
|
||||||
</span>
|
|
||||||
<span>{mission.name}</span>
|
<span>{mission.name}</span>
|
||||||
</ItemTitle>
|
</ItemTitle>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -124,9 +113,7 @@ export function MissionCard({ mission }: MissionCardProps) {
|
||||||
</ItemHeader>
|
</ItemHeader>
|
||||||
<ItemContent>
|
<ItemContent>
|
||||||
<div className="flex flex-col gap-3 w-full">
|
<div className="flex flex-col gap-3 w-full">
|
||||||
<p className="text-sm text-muted-foreground line-clamp-2">
|
<p className="text-sm text-muted-foreground line-clamp-2">{mission.summary}</p>
|
||||||
{mission.summary}
|
|
||||||
</p>
|
|
||||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground">
|
<div className="flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground">
|
||||||
<span className="flex items-center gap-1">
|
<span className="flex items-center gap-1">
|
||||||
<CalendarDaysIcon className="size-3" />
|
<CalendarDaysIcon className="size-3" />
|
||||||
|
|
@ -144,9 +131,7 @@ export function MissionCard({ mission }: MissionCardProps) {
|
||||||
{mission.missionRoles.maxPlayers} slots
|
{mission.missionRoles.maxPlayers} slots
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{campaign && (
|
{campaign && <span className="text-primary">{campaign.name}</span>}
|
||||||
<span className="text-primary">{campaign.name}</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ItemContent>
|
</ItemContent>
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,7 @@ interface MissionCommsProps {
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}[];
|
}[];
|
||||||
direction: ("ltr" | "rtl") | null;
|
direction: ("ltr" | "rtl") | null;
|
||||||
format:
|
format: "left" | "start" | "center" | "right" | "end" | "justify" | "";
|
||||||
| "left"
|
|
||||||
| "start"
|
|
||||||
| "center"
|
|
||||||
| "right"
|
|
||||||
| "end"
|
|
||||||
| "justify"
|
|
||||||
| "";
|
|
||||||
indent: number;
|
indent: number;
|
||||||
version: number;
|
version: number;
|
||||||
};
|
};
|
||||||
|
|
@ -48,9 +41,7 @@ export function MissionComms({ commsAndDocs }: MissionCommsProps) {
|
||||||
</div>
|
</div>
|
||||||
</ItemHeader>
|
</ItemHeader>
|
||||||
<ItemContent>
|
<ItemContent>
|
||||||
<p className="text-sm text-muted-foreground italic">
|
<p className="text-sm text-muted-foreground italic">No communications plan available.</p>
|
||||||
No communications plan available.
|
|
||||||
</p>
|
|
||||||
</ItemContent>
|
</ItemContent>
|
||||||
</Item>
|
</Item>
|
||||||
);
|
);
|
||||||
|
|
@ -105,18 +96,10 @@ export function MissionComms({ commsAndDocs }: MissionCommsProps) {
|
||||||
<tbody>
|
<tbody>
|
||||||
{frequencies!.map((freq, index) => (
|
{frequencies!.map((freq, index) => (
|
||||||
<tr key={index} className="border-b border-border/50">
|
<tr key={index} className="border-b border-border/50">
|
||||||
<td className="px-4 py-2 font-mono font-medium">
|
<td className="px-4 py-2 font-mono font-medium">{freq.frequency}</td>
|
||||||
{freq.frequency}
|
<td className="px-4 py-2 text-muted-foreground">{freq.channel ?? "—"}</td>
|
||||||
</td>
|
<td className="px-4 py-2 font-medium">{freq.netName}</td>
|
||||||
<td className="px-4 py-2 text-muted-foreground">
|
<td className="px-4 py-2 text-muted-foreground">{freq.freqUsage}</td>
|
||||||
{freq.channel ?? "—"}
|
|
||||||
</td>
|
|
||||||
<td className="px-4 py-2 font-medium">
|
|
||||||
{freq.netName}
|
|
||||||
</td>
|
|
||||||
<td className="px-4 py-2 text-muted-foreground">
|
|
||||||
{freq.freqUsage}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,7 @@ export function MissionObjectives({ objectives }: MissionObjectivesProps) {
|
||||||
</div>
|
</div>
|
||||||
</ItemHeader>
|
</ItemHeader>
|
||||||
<ItemContent>
|
<ItemContent>
|
||||||
<p className="text-sm text-muted-foreground italic">
|
<p className="text-sm text-muted-foreground italic">No objectives defined.</p>
|
||||||
No objectives defined.
|
|
||||||
</p>
|
|
||||||
</ItemContent>
|
</ItemContent>
|
||||||
</Item>
|
</Item>
|
||||||
);
|
);
|
||||||
|
|
@ -61,12 +59,12 @@ export function MissionObjectives({ objectives }: MissionObjectivesProps) {
|
||||||
{objectives.map((obj, index) => (
|
{objectives.map((obj, index) => (
|
||||||
<tr key={index} className="border-b border-border/50">
|
<tr key={index} className="border-b border-border/50">
|
||||||
<td className="px-4 py-2 font-medium">{obj.title}</td>
|
<td className="px-4 py-2 font-medium">{obj.title}</td>
|
||||||
<td className="px-4 py-2 text-muted-foreground">
|
<td className="px-4 py-2 text-muted-foreground max-w-md wrap-break-word">
|
||||||
{obj.description ?? "—"}
|
{obj.description ?? "—"}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-2 text-center">
|
<td className="px-4 py-2 text-center">
|
||||||
{obj.missionCritical ? (
|
{obj.missionCritical ? (
|
||||||
<CheckIcon className="size-3.5 text-green-400 inline" />
|
<CheckIcon className="size-3.5 text-orange-400 inline" />
|
||||||
) : (
|
) : (
|
||||||
<XIcon className="size-3.5 text-muted-foreground inline" />
|
<XIcon className="size-3.5 text-muted-foreground inline" />
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue