From 9f8656e590675e2720bf4c3e570f09cee447f1f2 Mon Sep 17 00:00:00 2001 From: Spythere Date: Wed, 21 Aug 2024 17:06:50 +0200 Subject: [PATCH] fix: progress indicator --- src/components/TrainsView/StopLabel.vue | 2 +- src/components/TrainsView/TrainInfo.vue | 2 +- src/components/TrainsView/TrainSchedule.vue | 2 +- src/mixins/trainInfoMixin.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/TrainsView/StopLabel.vue b/src/components/TrainsView/StopLabel.vue index 5c94c89..83ef967 100644 --- a/src/components/TrainsView/StopLabel.vue +++ b/src/components/TrainsView/StopLabel.vue @@ -3,7 +3,7 @@ class="stop-label" :data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)" > - + diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue index b387049..0e7813b 100644 --- a/src/components/TrainsView/TrainInfo.vue +++ b/src/components/TrainsView/TrainInfo.vue @@ -76,7 +76,7 @@
{{ $t('trains.via-title') }} - +
diff --git a/src/components/TrainsView/TrainSchedule.vue b/src/components/TrainsView/TrainSchedule.vue index c370ac3..d9a326d 100644 --- a/src/components/TrainsView/TrainSchedule.vue +++ b/src/components/TrainsView/TrainSchedule.vue @@ -249,7 +249,7 @@ export default defineComponent({ i < this.train.timetableData!.followingStops.length; i++ ) { - if (/(, po|sbl|, pe)/gi.test(this.train.timetableData!.followingStops[i].stopNameRAW)) + if (/(, po$|sbl|, pe$)/gi.test(this.train.timetableData!.followingStops[i].stopNameRAW)) activeMinorStopList.push(i); else break; } diff --git a/src/mixins/trainInfoMixin.ts b/src/mixins/trainInfoMixin.ts index 67ab185..ecaae14 100644 --- a/src/mixins/trainInfoMixin.ts +++ b/src/mixins/trainInfoMixin.ts @@ -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( `${ stop.stopName }` ); - 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( `${ stop.stopName