FlightStatus icon colors: use brand palette (Angular statusColors parity)

This commit is contained in:
2026-04-20 14:22:29 +03:00
parent 6947e07fd1
commit 3c869198d6
+13 -7
View File
@@ -20,20 +20,26 @@ const STATUS_CLASSES: Record<FlightStatusType, string> = {
Unknown: "flight-status--unknown",
};
// Mirrors Angular's `flight-status-colors.ts` palette via the brand
// color tokens (see `src/styles/_colors.scss`): Delayed uses $orange,
// Cancelled uses $red, and every in-flight / landed / arrived / sent /
// unknown state uses $green. Scheduled falls through to $blue, which is
// what Angular's statusColors.scheduled ('blue') resolves to.
function statusColor(status: FlightStatusType): string {
switch (status) {
case "Delayed":
return "#f37b09"; // $orange
case "Cancelled":
return "#c8102e"; // $red
case "Arrived":
case "Landed":
return "#6da244";
case "Sent":
case "InFlight":
return "#2457ff";
case "Cancelled":
return "#e55353";
case "Delayed":
return "#f29f3a";
case "Unknown":
return "#25a24e"; // $green
case "Scheduled":
default:
return "#2457ff";
return "#1b62b4"; // $blue
}
}