Update colors

This commit is contained in:
april 2024-01-08 13:12:16 -06:00
parent c4f990ea19
commit 921a3be6b2
3 changed files with 33 additions and 21 deletions

View File

@ -130,11 +130,17 @@ export default function Flight() {
{(log.pax || log.crew) && {(log.pax || log.crew) &&
(log.pax.length > 0 || log.crew.length > 0) ? ( (log.pax.length > 0 || log.crew.length > 0) ? (
<Group grow mt="sm"> <Group grow mt="sm">
<VerticalLogItem label="Pax" content={log.pax} list /> <VerticalLogItem
label="Pax"
content={log.pax}
list
listColor="gray"
/>
<VerticalLogItem <VerticalLogItem
label="Crew" label="Crew"
content={log.crew} content={log.crew}
list list
listColor="gray"
/> />
</Group> </Group>
) : null} ) : null}

View File

@ -116,26 +116,30 @@ function FlightsListDisplay({
</Text> </Text>
{flight.waypoint_from || {flight.waypoint_from ||
flight.waypoint_to ? ( flight.waypoint_to ? (
<Text>/</Text> <>
<Text>/</Text>
<Group gap="xs">
{flight.waypoint_from ? (
<Text>
{flight.waypoint_from}
</Text>
) : (
""
)}
{flight.waypoint_from &&
flight.waypoint_to ? (
<IconArrowRightTail />
) : null}
{flight.waypoint_to ? (
<Text>
{flight.waypoint_to}
</Text>
) : (
""
)}
</Group>
</>
) : null} ) : null}
<Group gap="xs">
{flight.waypoint_from ? (
<Text>
{flight.waypoint_from}
</Text>
) : (
""
)}
{flight.waypoint_from &&
flight.waypoint_to ? (
<IconArrowRightTail />
) : null}
{flight.waypoint_to ? (
<Text>{flight.waypoint_to}</Text>
) : (
""
)}
</Group>
</Group> </Group>
} }
description={ description={

View File

@ -27,6 +27,7 @@ export function VerticalLogItem({
time = false, time = false,
date = false, date = false,
list = false, list = false,
listColor = "",
}: { }: {
label: string; label: string;
content: string | string[] | null; content: string | string[] | null;
@ -35,6 +36,7 @@ export function VerticalLogItem({
time?: boolean; time?: boolean;
date?: boolean; date?: boolean;
list?: boolean; list?: boolean;
listColor?: string;
}) { }) {
if (content === null) content = ""; if (content === null) content = "";
if (decimal > 0) content = Number(content).toFixed(decimal); if (decimal > 0) content = Number(content).toFixed(decimal);
@ -56,7 +58,7 @@ export function VerticalLogItem({
{(content as string[]).length > 0 ? ( {(content as string[]).length > 0 ? (
<Text size="lg"> <Text size="lg">
{(content as string[]).map((item) => ( {(content as string[]).map((item) => (
<Badge key={randomId()} size="lg" mx="xs"> <Badge key={randomId()} size="lg" mx="xs" color={listColor}>
{item} {item}
</Badge> </Badge>
))} ))}