chore: better descriptions for active timetables statuses in scenery view

This commit is contained in:
2025-07-04 17:12:38 +02:00
parent 1453dbda01
commit dd0d7897cf
4 changed files with 32 additions and 43 deletions
@@ -134,9 +134,9 @@
</b> </b>
<b>&nbsp;{{ row.train.trainNo }}</b> <b>&nbsp;{{ row.train.trainNo }}</b>
<span>&nbsp;&bull;&nbsp;</span>
<span>{{ row.train.driverName }}</span>
</span> </span>
<span>&bull;</span>
<span>{{ row.train.driverName }}</span>
<!-- Train stop comments --> <!-- Train stop comments -->
<span <span
@@ -510,7 +510,8 @@ export default defineComponent({
.info-train { .info-train {
display: flex; display: flex;
gap: 0.5em; flex-wrap: wrap;
gap: 0.25em;
} }
.info-train > .train-badge { .info-train > .train-badge {
@@ -2,11 +2,9 @@
<div class="general-status"> <div class="general-status">
<span <span
:class="computedScheduledTrain.status" :class="computedScheduledTrain.status"
data-tooltip-type="HtmlTooltip"
:data-tooltip-content="computedScheduledTrain.stopStatusDescription"
@click.prevent="() => {}" @click.prevent="() => {}"
v-html="computedScheduledTrain.stopStatusIndicator"
> >
{{ computedScheduledTrain.stopStatusIndicator }}
</span> </span>
</div> </div>
</template> </template>
@@ -41,8 +39,7 @@ export default defineComponent({
switch (status) { switch (status) {
case StopStatus.ARRIVING: case StopStatus.ARRIVING:
stopStatusIndicator = `${this.$t('timetables.from')}: ${prevDepartureIndicator}`; stopStatusIndicator = this.$t('timetables.desc-arriving', {
stopStatusDescription = this.$t('timetables.desc-arriving', {
prevStationName: prevElement?.stationName ?? '', prevStationName: prevElement?.stationName ?? '',
prevDepartureLine: prevElement?.departureRouteExt ?? '' prevDepartureLine: prevElement?.departureRouteExt ?? ''
}); });
@@ -51,9 +48,6 @@ export default defineComponent({
case StopStatus.ONLINE: case StopStatus.ONLINE:
case StopStatus.STOPPED: case StopStatus.STOPPED:
stopStatusIndicator = nextElement?.arrivalRouteExt stopStatusIndicator = nextElement?.arrivalRouteExt
? `${this.$t('timetables.to')}: ${nextArrivalIndicator}`
: `${this.$t('timetables.desc-end')}`;
stopStatusDescription = nextElement?.arrivalRouteExt
? this.$t(`timetables.desc-${status}`, { ? this.$t(`timetables.desc-${status}`, {
nextStationName: nextElement?.stationName, nextStationName: nextElement?.stationName,
nextArrivalLine: nextElement?.arrivalRouteExt nextArrivalLine: nextElement?.arrivalRouteExt
@@ -62,14 +56,14 @@ export default defineComponent({
break; break;
case StopStatus.DEPARTED: case StopStatus.DEPARTED:
stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`; // stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
if (!nextElement?.stationName) { if (!nextElement?.stationName) {
stopStatusDescription = this.$t('timetables.desc-departed-ends', { stopStatusIndicator = this.$t('timetables.desc-departed-ends', {
nextStationName: currentElement.stationName nextStationName: currentElement.stationName
}); });
} else { } else {
stopStatusDescription = this.$t('timetables.desc-departed', { stopStatusIndicator = this.$t('timetables.desc-departed', {
nextStationName: nextElement?.stationName ?? currentElement.stationName, nextStationName: nextElement?.stationName ?? currentElement.stationName,
nextArrivalLine: nextElement?.arrivalRouteExt nextArrivalLine: nextElement?.arrivalRouteExt
}); });
@@ -78,16 +72,16 @@ export default defineComponent({
break; break;
case StopStatus.DEPARTED_AWAY: case StopStatus.DEPARTED_AWAY:
stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`; // stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
stopStatusDescription = this.$t('timetables.desc-departed-away', { stopStatusIndicator = this.$t('timetables.desc-departed-away', {
nextStationName: nextElement?.stationName, nextStationName: nextElement?.stationName,
nextArrivalLine: nextElement?.arrivalRouteExt nextArrivalLine: nextElement?.arrivalRouteExt
}); });
break; break;
case StopStatus.TERMINATED: case StopStatus.TERMINATED:
stopStatusIndicator = `X ${this.$t('timetables.desc-terminated')}`; // stopStatusIndicator = `X ${this.$t('timetables.desc-terminated')}`;
stopStatusDescription = this.$t('timetables.desc-terminated'); stopStatusIndicator = this.$t('timetables.desc-terminated');
break; break;
default: default:
@@ -95,7 +89,6 @@ export default defineComponent({
} }
return { return {
...this.sceneryTimetableRow, ...this.sceneryTimetableRow,
stopStatusDescription,
stopStatusIndicator stopStatusIndicator
}; };
} }
@@ -106,7 +99,6 @@ export default defineComponent({
<style lang="scss" scoped> <style lang="scss" scoped>
.general-status { .general-status {
margin-top: 0.5em; margin-top: 0.5em;
cursor: help;
span.arriving { span.arriving {
color: #ccc; color: #ccc;
@@ -114,17 +106,14 @@ export default defineComponent({
span.departed { span.departed {
color: lime; color: lime;
font-weight: bold;
&-away { &-away {
font-weight: bold;
color: #5ecc5e; color: #5ecc5e;
} }
} }
span.stopped { span.stopped {
color: #ffa600; color: #ffa600;
font-weight: bold;
} }
span.online { span.online {
@@ -133,7 +122,6 @@ export default defineComponent({
span.terminated { span.terminated {
color: salmon; color: salmon;
font-weight: bold;
} }
} }
</style> </style>
+9 -9
View File
@@ -589,15 +589,15 @@
"terminated": "Timetable terminated", "terminated": "Timetable terminated",
"begins": "BEGINS HERE", "begins": "BEGINS HERE",
"terminates": "TERMINATES\nHERE", "terminates": "TERMINATES\nHERE",
"from": "FROM", "from": "Arrives from",
"to": "TO", "to": "Departs to",
"desc-arriving": "The train is not here yet.\nIt's going to come from: <b>{prevStationName} (route {prevDepartureLine})</b>", "desc-arriving": "<i>Arrives from: <b>{prevStationName} ({prevDepartureLine})</b></i>",
"desc-online": "The train is at the station.\nIt's going to leave to: <b>{nextStationName} (route {nextArrivalLine})</b>", "desc-online": "On scenery / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-stopped": "The train is at the station and is stopped.\nIt's going to leave towards: <b>{nextStationName} (route {nextArrivalLine})</b>", "desc-stopped": "On scenery - stopped / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-next-arrival": "Leaves towards: <b>{nextStationName} (route {nextArrivalLine})</b>", "desc-next-arrival": "On scenery / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-departed": "The train is at the station and it's been departed.\nLeaves towards: <b>{nextStationName} (route {nextArrivalLine})</b>", "desc-departed": "On scenery / <i>departed to: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-departed-ends": "The train is at the station and it's been departed.\nLeaves towards station: <b>{nextStationName}</b>", "desc-departed-ends": "On scenery / <i>departed to: <b>{nextStationName}</b></i>",
"desc-departed-away": "The train has been departed to:\n<b>{nextStationName} (route {nextArrivalLine})</b>", "desc-departed-away": "<i>Departed to: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-end": "The train terminates here", "desc-end": "The train terminates here",
"desc-terminated": "The train has been terminated" "desc-terminated": "The train has been terminated"
}, },
+10 -10
View File
@@ -575,17 +575,17 @@
"terminated": "Rozkład jazdy zakończony", "terminated": "Rozkład jazdy zakończony",
"begins": "ROZPOCZYNA\nBIEG", "begins": "ROZPOCZYNA\nBIEG",
"terminates": "KOŃCZY BIEG", "terminates": "KOŃCZY BIEG",
"from": "Z", "from": "Przyjedzie z",
"to": "DO", "to": "Odjeżdża do",
"desc-arriving": "Pociągu nie ma jeszcze na tej scenerii.\nPrzyjedzie z: <b>{prevStationName} (szlak {prevDepartureLine})</b>", "desc-arriving": "<i>Przyjedzie z: <b>{prevStationName} ({prevDepartureLine})</b></i>",
"desc-online": "Pociąg jest na tej scenerii.\nOdjedzie w kierunku: <b>{nextStationName} (szlak {nextArrivalLine})</b>", "desc-online": "Na scenerii / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-stopped": "Pociąg jest na tej scenerii i odbywa postój.\nOdjedzie w kierunku: <b>{nextStationName} (szlak {nextArrivalLine})</b>", "desc-stopped": "Na scenerii - postój / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-next-arrival": "Odjeżdża do:\n<b>{nextStationName} (szlak {nextArrivalLine})</b>", "desc-next-arrival": "Na scenerii / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-departed": "Pociąg jest na tej scenerii i został odprawiony.\nOdjeżdża w kierunku: <b>{nextStationName} (szlak {nextArrivalLine})</b>", "desc-departed": "Na scenerii / <i>odprawiony do: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-departed-ends": "Pociąg jest na tej scenerii i został odprawiony.\nOdjechał w kierunku stacji: <b>{nextStationName}</b>", "desc-departed-ends": "Na scenerii / <i>odprawiony do: <b>{nextStationName}</b></i>",
"desc-departed-away": "Pociąg został odprawiony i odjechał do:\n<b>{nextStationName} (szlak {nextArrivalLine})</b>", "desc-departed-away": "<i>Odprawiony do: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-end": "Pociąg kończy bieg", "desc-end": "Pociąg kończy bieg",
"desc-terminated": "Pociąg skończył bieg" "desc-terminated": "Pociąg zaskończył bieg"
}, },
"history": { "history": {
"title": "DZIENNIK ROZKŁADÓW JAZDY" "title": "DZIENNIK ROZKŁADÓW JAZDY"