From 10934b12d89877caff50bc307b581ad9c95b995c Mon Sep 17 00:00:00 2001 From: Spythere Date: Wed, 6 Jul 2022 22:34:19 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20responsywno=C5=9Bci=20widoku=20scenerii?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TrainsView/TrainSchedule.vue | 18 +++++++++++++++++- src/mixins/trainInfoMixin.ts | 3 +-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/TrainsView/TrainSchedule.vue b/src/components/TrainsView/TrainSchedule.vue index 1058d28..22109c4 100644 --- a/src/components/TrainsView/TrainSchedule.vue +++ b/src/components/TrainsView/TrainSchedule.vue @@ -123,7 +123,7 @@ export default defineComponent({ if (lastMajorConfirmed + 1 >= props.train.timetableData!.followingStops.length) return activeMinorStopList; for (let i = lastMajorConfirmed + 1; i < props.train.timetableData!.followingStops.length; i++) { - if (props.train.timetableData!.followingStops[i].stopNameRAW.includes('po.')) activeMinorStopList.push(i); + if (/po\.|sbl/gi.test(props.train.timetableData!.followingStops[i].stopNameRAW)) activeMinorStopList.push(i); else break; } @@ -144,6 +144,7 @@ export default defineComponent({ begin: stop.beginsHere, end: stop.terminatesHere, delayed: stop.departureDelay > 0, + sbl: /sbl/gi.test(stop.stopName), [stop.stopType.replaceAll(', ', '-')]: stop.stopType.match(new RegExp('ph|pm|pt')) && !stop.confirmed && !stop.beginsHere, 'minor-stop-active': this.activeMinorStops.includes(index), @@ -232,6 +233,10 @@ ul.stock-list { display: flex; align-items: center; + + &.misc { + background: gray; + } } .stop-comment { @@ -272,6 +277,17 @@ ul.stop_list > li.stop { padding: 0 0.5em; + &.sbl { + .stop-name, + .stop-date { + opacity: 0.7; + } + + .stop-name { + background-color: #333; + } + } + &[class*='ph'] > .stop_info > .indicator { border-color: $stopNameClr; } diff --git a/src/mixins/trainInfoMixin.ts b/src/mixins/trainInfoMixin.ts index 3ae046e..fa6cb1b 100644 --- a/src/mixins/trainInfoMixin.ts +++ b/src/mixins/trainInfoMixin.ts @@ -65,8 +65,7 @@ export default defineComponent({ else if ( i > 0 && i < stops.length - 1 && - !stop.stopNameRAW.includes('po.') && - !stop.stopNameRAW.includes('SBL') + !/po\.|sbl/gi.test(stop.stopNameRAW) ) acc.push(`${stop.stopName}`); return acc;