diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-12 10:36:45 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-12 10:36:45 +0100 |
| commit | 401b6a7bcf0e4f93f4605d77a35325b8211288ba (patch) | |
| tree | 2fc088ee63c67d09332da257f62ae5fe4f4f53e1 /src/frontend | |
| parent | 3a1a1e6dc2f6f0abceac5da0cfb530fdb45fc6f5 (diff) | |
fix: enhance route matching logic and improve CSS layout for consolidated circulation card
Diffstat (limited to 'src/frontend')
| -rw-r--r-- | src/frontend/app/components/Stops/ConsolidatedCirculationCard.css | 1 | ||||
| -rw-r--r-- | src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx | 42 |
2 files changed, 24 insertions, 19 deletions
diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css index 935c06d..d9ed38f 100644 --- a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css +++ b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css @@ -117,6 +117,7 @@ .consolidated-circulation-card .card-row.meta { justify-content: flex-start; + flex-wrap: wrap; gap: 0.4rem; } diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx index 425cf7b..679345f 100644 --- a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx +++ b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx @@ -250,28 +250,32 @@ export const ConsolidatedCirculationCard: React.FC< }); } - if (estimate.currentPosition) { - if (estimate.isPreviousTrip) { - chips.push({ label: t("estimates.previous_trip"), kind: "gps" }); - } else { - chips.push({ label: t("estimates.bus_gps_position"), kind: "gps" }); + if (!reduced) { + if (estimate.currentPosition) { + if (estimate.isPreviousTrip) { + chips.push({ label: t("estimates.previous_trip"), kind: "gps" }); + } else { + chips.push({ label: t("estimates.bus_gps_position"), kind: "gps" }); + } } - } - if (timeClass === "time-delayed") { - chips.push({ - label: reduced ? "!" : t("estimates.low_accuracy"), - tone: "warning", - kind: "warning", - }); - } + if (driver !== "renfe") { + if (timeClass === "time-delayed") { + chips.push({ + label: reduced ? "!" : t("estimates.low_accuracy"), + tone: "warning", + kind: "warning", + }); + } - if (timeClass === "time-scheduled") { - chips.push({ - label: reduced ? "⧗" : t("estimates.no_realtime"), - tone: "warning", - kind: "warning", - }); + if (timeClass === "time-scheduled") { + chips.push({ + label: reduced ? "⧗" : t("estimates.no_realtime"), + tone: "warning", + kind: "warning", + }); + } + } } return chips; |
