diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue index 900811e..997423f 100644 --- a/src/components/SceneryView/SceneryTimetable.vue +++ b/src/components/SceneryView/SceneryTimetable.vue @@ -29,8 +29,6 @@
- -
@@ -43,115 +41,116 @@ {{ $t('scenery.no-timetables') }} -
- - - - {{ scheduledTrain.category }} - {{ scheduledTrain.trainNo }} + +
+ + + + {{ scheduledTrain.category }} + {{ scheduledTrain.trainNo }} - - - - - -  |  - - {{ scheduledTrain.driverName }} - - -
- {{ scheduledTrain.beginsAt }} - {{ scheduledTrain.terminatesAt }} -
- - -
-
- - - - - {{ $t('timetables.begins') }} - - - -
- {{ timestampToString(scheduledTrain.stopInfo.arrivalTimestamp) }} -
-
-
- {{ - timestampToString(scheduledTrain.stopInfo.arrivalTimestamp) - }} -
- - - {{ timestampToString(scheduledTrain.stopInfo.arrivalRealTimestamp) }} - ({{ scheduledTrain.stopInfo.arrivalDelay > 0 ? '+' : '' }}{{ scheduledTrain.stopInfo.arrivalDelay }}) + + + + +  |  + + {{ scheduledTrain.driverName }} + + +
+ {{ scheduledTrain.beginsAt }} - {{ scheduledTrain.terminatesAt }}
+ + - - - - {{ scheduledTrain.stopInfo.stopTime }} - {{ scheduledTrain.stopInfo.stopType || 'pt' }} + + + + {{ $t('timetables.begins') }} -   - - - - - - - {{ scheduledTrain.arrivingLine }} - - - - {{ scheduledTrain.departureLine }} - - - - - - - {{ $t('timetables.terminates') }} - - - -
- {{ timestampToString(scheduledTrain.stopInfo.departureTimestamp) }} -
-
-
- {{ - timestampToString(scheduledTrain.stopInfo.departureTimestamp) - }} + +
+ {{ timestampToString(scheduledTrain.stopInfo.arrivalTimestamp) }}
+
+
+ {{ + timestampToString(scheduledTrain.stopInfo.arrivalTimestamp) + }} +
- - {{ timestampToString(scheduledTrain.stopInfo.departureRealTimestamp) }} - ({{ scheduledTrain.stopInfo.departureDelay > 0 ? '+' : '' - }}{{ scheduledTrain.stopInfo.departureDelay }}) + + {{ timestampToString(scheduledTrain.stopInfo.arrivalRealTimestamp) }} + ({{ scheduledTrain.stopInfo.arrivalDelay > 0 ? '+' : '' + }}{{ scheduledTrain.stopInfo.arrivalDelay }}) + +
+
+ + + + + + {{ scheduledTrain.stopInfo.stopTime }} + {{ scheduledTrain.stopInfo.stopType || 'pt' }} -
+ +   + + + + + + + {{ scheduledTrain.arrivingLine }} + + + + {{ scheduledTrain.departureLine }} + + + + + + + {{ $t('timetables.terminates') }} + + + +
+ {{ timestampToString(scheduledTrain.stopInfo.departureTimestamp) }} +
+
+
+ {{ + timestampToString(scheduledTrain.stopInfo.departureTimestamp) + }} +
+ + + {{ timestampToString(scheduledTrain.stopInfo.departureRealTimestamp) }} + ({{ scheduledTrain.stopInfo.departureDelay > 0 ? '+' : '' + }}{{ scheduledTrain.stopInfo.departureDelay }}) + +
+
- -
+
+
- - @@ -169,6 +168,7 @@ import { useStore } from '../../store/store'; import imageMixin from '../../mixins/imageMixin'; import modalTrainMixin from '../../mixins/modalTrainMixin'; import ScheduledTrainStatus from './ScheduledTrainStatus.vue'; +import ScheduledTrain from '../../scripts/interfaces/ScheduledTrain'; export default defineComponent({ name: 'SceneryTimetable', @@ -273,11 +273,21 @@ export default defineComponent({ @import '../../styles/responsive.scss'; @import '../../styles/variables.scss'; -// .scenery-timetable { -// height: 85vh; -// max-height: 900px; -// min-height: 450px; -// } +.timetables-anim-move, +.timetables-anim-enter-active, +.timetables-anim-leave-active { + transition: all 250ms ease; +} + +.timetables-anim-enter-from, +.timetables-anim-leave-to { + opacity: 0; + transform: translateY(30px); +} + +.timetables-anim-leave-active { + position: absolute; +} .scenery-timetable { height: 100%; diff --git a/src/scripts/utils/storeUtils.ts b/src/scripts/utils/storeUtils.ts index 57fb74a..57d0062 100644 --- a/src/scripts/utils/storeUtils.ts +++ b/src/scripts/utils/storeUtils.ts @@ -136,8 +136,8 @@ export function getScheduledTrain(train: Train, trainStopIndex: number, stationN } } - let departureLine: string | null = trainStop.departureLine; - let arrivingLine: string | null = trainStop.arrivalLine; + let departureLine: string | null = null; + let arrivingLine: string | null = null; for (let i = trainStopIndex; i < followingStops.length; i++) { const currentStop = followingStops[i];