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;
|
||||
};
|
||||
ownershipAndStatus: {
|
||||
status:
|
||||
| "Concept"
|
||||
| "Planning"
|
||||
| "Ready"
|
||||
| "Scheduled"
|
||||
| "Active"
|
||||
| "Completed"
|
||||
| "Cancelled";
|
||||
status: "Concept" | "Planning" | "Ready" | "Scheduled" | "Active" | "Completed" | "Cancelled";
|
||||
};
|
||||
missionRoles?: {
|
||||
maxPlayers: number;
|
||||
|
|
@ -72,9 +65,7 @@ const operationTypeLabels: Record<string, string> = {
|
|||
|
||||
export function MissionCard({ mission }: MissionCardProps) {
|
||||
const map =
|
||||
typeof mission.classification.map === "object"
|
||||
? (mission.classification.map as Map)
|
||||
: null;
|
||||
typeof mission.classification.map === "object" ? (mission.classification.map as Map) : null;
|
||||
const campaign =
|
||||
typeof mission.classification.campaign === "object"
|
||||
? (mission.classification.campaign as Campaign)
|
||||
|
|
@ -103,9 +94,7 @@ export function MissionCard({ mission }: MissionCardProps) {
|
|||
<CrosshairIcon />
|
||||
</ItemMedia>
|
||||
<ItemTitle className="flex flex-col">
|
||||
<span className="font-mono text-xs text-muted-foreground">
|
||||
{mission.codeName}
|
||||
</span>
|
||||
<span className="font-mono text-xs text-muted-foreground">{mission.codeName}</span>
|
||||
<span>{mission.name}</span>
|
||||
</ItemTitle>
|
||||
</div>
|
||||
|
|
@ -124,9 +113,7 @@ export function MissionCard({ mission }: MissionCardProps) {
|
|||
</ItemHeader>
|
||||
<ItemContent>
|
||||
<div className="flex flex-col gap-3 w-full">
|
||||
<p className="text-sm text-muted-foreground line-clamp-2">
|
||||
{mission.summary}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground line-clamp-2">{mission.summary}</p>
|
||||
<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">
|
||||
<CalendarDaysIcon className="size-3" />
|
||||
|
|
@ -144,9 +131,7 @@ export function MissionCard({ mission }: MissionCardProps) {
|
|||
{mission.missionRoles.maxPlayers} slots
|
||||
</span>
|
||||
)}
|
||||
{campaign && (
|
||||
<span className="text-primary">{campaign.name}</span>
|
||||
)}
|
||||
{campaign && <span className="text-primary">{campaign.name}</span>}
|
||||
</div>
|
||||
</div>
|
||||
</ItemContent>
|
||||
|
|
|
|||
|
|
@ -20,14 +20,7 @@ interface MissionCommsProps {
|
|||
[k: string]: unknown;
|
||||
}[];
|
||||
direction: ("ltr" | "rtl") | null;
|
||||
format:
|
||||
| "left"
|
||||
| "start"
|
||||
| "center"
|
||||
| "right"
|
||||
| "end"
|
||||
| "justify"
|
||||
| "";
|
||||
format: "left" | "start" | "center" | "right" | "end" | "justify" | "";
|
||||
indent: number;
|
||||
version: number;
|
||||
};
|
||||
|
|
@ -48,9 +41,7 @@ export function MissionComms({ commsAndDocs }: MissionCommsProps) {
|
|||
</div>
|
||||
</ItemHeader>
|
||||
<ItemContent>
|
||||
<p className="text-sm text-muted-foreground italic">
|
||||
No communications plan available.
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground italic">No communications plan available.</p>
|
||||
</ItemContent>
|
||||
</Item>
|
||||
);
|
||||
|
|
@ -105,18 +96,10 @@ export function MissionComms({ commsAndDocs }: MissionCommsProps) {
|
|||
<tbody>
|
||||
{frequencies!.map((freq, index) => (
|
||||
<tr key={index} className="border-b border-border/50">
|
||||
<td className="px-4 py-2 font-mono font-medium">
|
||||
{freq.frequency}
|
||||
</td>
|
||||
<td className="px-4 py-2 text-muted-foreground">
|
||||
{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>
|
||||
<td className="px-4 py-2 font-mono font-medium">{freq.frequency}</td>
|
||||
<td className="px-4 py-2 text-muted-foreground">{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>
|
||||
))}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ export function MissionObjectives({ objectives }: MissionObjectivesProps) {
|
|||
</div>
|
||||
</ItemHeader>
|
||||
<ItemContent>
|
||||
<p className="text-sm text-muted-foreground italic">
|
||||
No objectives defined.
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground italic">No objectives defined.</p>
|
||||
</ItemContent>
|
||||
</Item>
|
||||
);
|
||||
|
|
@ -61,12 +59,12 @@ export function MissionObjectives({ objectives }: MissionObjectivesProps) {
|
|||
{objectives.map((obj, index) => (
|
||||
<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 text-muted-foreground">
|
||||
<td className="px-4 py-2 text-muted-foreground max-w-md wrap-break-word">
|
||||
{obj.description ?? "—"}
|
||||
</td>
|
||||
<td className="px-4 py-2 text-center">
|
||||
{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" />
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue