fix: progress indicator

This commit is contained in:
2024-08-21 17:06:50 +02:00
parent 573ebc233b
commit 9f8656e590
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -75,18 +75,18 @@ export default defineComponent({
return positionString.charAt(0).toUpperCase() + positionString.slice(1);
},
displayStopList(stops: TrainStop[]): string | undefined {
getTrainStopsHtml(stops: TrainStop[]): string {
if (!stops) return '';
return stops
.reduce((acc: string[], stop: TrainStop, i: number) => {
if (stop.stopType.includes('ph') && !stop.stopNameRAW.includes(', po'))
if (stop.stopType.includes('ph'))
acc.push(
`<strong style='color:${stop.confirmed ? 'springgreen' : 'white'}'>${
stop.stopName
}</strong>`
);
else if (i > 0 && i < stops.length - 1 && !/(, po|sbl)/gi.test(stop.stopNameRAW))
else if (i > 0 && i < stops.length - 1 && !/(, po$|sbl)/gi.test(stop.stopNameRAW))
acc.push(
`<span style='color:${stop.confirmed ? 'springgreen' : 'lightgray'}'>${
stop.stopName