diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue index 09464f2..a83a86e 100644 --- a/src/components/SceneryView/SceneryTimetable.vue +++ b/src/components/SceneryView/SceneryTimetable.vue @@ -523,6 +523,7 @@ export default defineComponent({ .info-route { width: 100%; + margin-top: 0.25em; } .stop-comments-icon > img { diff --git a/src/components/SceneryView/ScheduledTrainStatus.vue b/src/components/SceneryView/ScheduledTrainStatus.vue index 2d642a9..d893930 100644 --- a/src/components/SceneryView/ScheduledTrainStatus.vue +++ b/src/components/SceneryView/ScheduledTrainStatus.vue @@ -1,11 +1,11 @@ @@ -27,6 +27,7 @@ export default defineComponent({ const { status, prevElement, currentElement, nextElement } = this.sceneryTimetableRow; let stopStatusIndicator = ''; + let stationNameHref = ''; switch (status) { case StopStatus.ARRIVING: @@ -35,6 +36,8 @@ export default defineComponent({ prevStationName: prevElement?.stationName ?? '', prevDepartureLine: prevElement?.departureRouteExt ?? '' }); + + stationNameHref = prevElement?.stationName ?? ''; } else { stopStatusIndicator = this.$t('timetables.desc-beginning'); } @@ -48,6 +51,9 @@ export default defineComponent({ nextArrivalLine: nextElement?.arrivalRouteExt }) : this.$t(`timetables.desc-end`); + + stationNameHref = nextElement?.stationName ?? ''; + break; case StopStatus.DEPARTED: @@ -55,11 +61,15 @@ export default defineComponent({ stopStatusIndicator = this.$t('timetables.desc-departed-ends', { nextStationName: currentElement.stationName }); + + stationNameHref = nextElement?.stationName ?? ''; } else { stopStatusIndicator = this.$t('timetables.desc-departed', { nextStationName: nextElement?.stationName ?? currentElement.stationName, nextArrivalLine: nextElement?.arrivalRouteExt }); + + stationNameHref = nextElement?.stationName ?? ''; } break; @@ -69,6 +79,8 @@ export default defineComponent({ nextStationName: nextElement?.stationName, nextArrivalLine: nextElement?.arrivalRouteExt }); + + stationNameHref = nextElement?.stationName ?? ''; break; case StopStatus.TERMINATED: @@ -80,9 +92,18 @@ export default defineComponent({ } return { ...this.sceneryTimetableRow, + stationNameHref, stopStatusIndicator }; } + }, + + methods: { + navigateToScenery(sceneryName?: string) { + if (!sceneryName) return; + + this.$router.push(`/scenery?station=${sceneryName}`); + } } }); @@ -91,11 +112,11 @@ export default defineComponent({ .general-status { margin-top: 0.5em; - span.arriving { + & > .arriving { color: #ccc; } - span.departed { + & > .departed { color: lime; &-away { @@ -103,15 +124,15 @@ export default defineComponent({ } } - span.stopped { + & > .stopped { color: #ffa600; } - span.online { + & > .online { color: gold; } - span.terminated { + & > .terminated { color: salmon; } } diff --git a/src/locales/en.json b/src/locales/en.json index dd9e8f9..ed0d447 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -592,13 +592,13 @@ "from": "Arrives from", "to": "Departs to", "desc-beginning": "The train begins here", - "desc-arriving": "Arrives from: {prevStationName} ({prevDepartureLine})", - "desc-online": "On scenery / direction: {nextStationName} ({nextArrivalLine})", - "desc-stopped": "On scenery - stopped / direction: {nextStationName} ({nextArrivalLine})", - "desc-next-arrival": "On scenery / direction: {nextStationName} ({nextArrivalLine})", - "desc-departed": "On scenery / departed to: {nextStationName} ({nextArrivalLine})", - "desc-departed-ends": "On scenery / departed to: {nextStationName}", - "desc-departed-away": "Departed to: {nextStationName} ({nextArrivalLine})", + "desc-arriving": "Arrives from: {prevStationName} ({prevDepartureLine})", + "desc-online": "On scenery / direction: {nextStationName} ({nextArrivalLine})", + "desc-stopped": "On scenery - stopped / direction: {nextStationName} ({nextArrivalLine})", + "desc-next-arrival": "On scenery / direction: {nextStationName} ({nextArrivalLine})", + "desc-departed": "On scenery / departed to: {nextStationName} ({nextArrivalLine})", + "desc-departed-ends": "On scenery / departed to: {nextStationName}", + "desc-departed-away": "Departed to: {nextStationName} ({nextArrivalLine})", "desc-end": "The train terminates here", "desc-terminated": "The train has been terminated" }, diff --git a/src/locales/pl.json b/src/locales/pl.json index b4b6774..6cab73a 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -578,13 +578,13 @@ "from": "Przyjedzie z", "to": "Odjeżdża do", "desc-beginning": "Pociąg rozpoczyna bieg", - "desc-arriving": "Przyjedzie z: {prevStationName} ({prevDepartureLine})", - "desc-online": "Na scenerii / kierunek: {nextStationName} ({nextArrivalLine})", - "desc-stopped": "Na scenerii - postój / kierunek: {nextStationName} ({nextArrivalLine})", - "desc-next-arrival": "Na scenerii / kierunek: {nextStationName} ({nextArrivalLine})", - "desc-departed": "Na scenerii / odprawiony do: {nextStationName} ({nextArrivalLine})", - "desc-departed-ends": "Na scenerii / odprawiony do: {nextStationName}", - "desc-departed-away": "Odprawiony do: {nextStationName} ({nextArrivalLine})", + "desc-arriving": "Przyjedzie z: {prevStationName} ({prevDepartureLine})", + "desc-online": "Na scenerii / kierunek: {nextStationName} ({nextArrivalLine})", + "desc-stopped": "Na scenerii - postój / kierunek: {nextStationName} ({nextArrivalLine})", + "desc-next-arrival": "Na scenerii / kierunek: {nextStationName} ({nextArrivalLine})", + "desc-departed": "Na scenerii / odprawiony do: {nextStationName} ({nextArrivalLine})", + "desc-departed-ends": "Na scenerii / odprawiony do: {nextStationName}", + "desc-departed-away": "Odprawiony do: {nextStationName} ({nextArrivalLine})", "desc-end": "Pociąg kończy bieg", "desc-terminated": "Pociąg zakończył bieg" },