mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Dodano ostrzeżenie dla dystansów RJ większych niż 200km
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<div class="train-table">
|
||||
<div class="traffic-warning" v-if="distanceLimitExceeded">
|
||||
{{ $t("trains.distance-exceeded") }}
|
||||
</div>
|
||||
|
||||
<div class="no-trains" v-if="computedTrains.length == 0 && timetableLoaded">
|
||||
{{ $t("trains.no-trains") }}
|
||||
</div>
|
||||
@@ -303,6 +307,15 @@ export default class TrainTable extends Vue {
|
||||
return this.timetableDataStatus == DataStatus.Error;
|
||||
}
|
||||
|
||||
get distanceLimitExceeded() {
|
||||
return (
|
||||
this.computedTrains.findIndex(
|
||||
(train) =>
|
||||
train.timetableData && train.timetableData.routeDistance > 200
|
||||
) != -1
|
||||
);
|
||||
}
|
||||
|
||||
changeScheduleShowState(elementId: number) {
|
||||
if (elementId < 0) return;
|
||||
|
||||
@@ -383,6 +396,12 @@ img.train-image {
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
.traffic-warning {
|
||||
padding: 1em 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
background: firebrick;
|
||||
}
|
||||
|
||||
.train {
|
||||
&-list {
|
||||
@include smallScreen() {
|
||||
@@ -395,7 +414,6 @@ img.train-image {
|
||||
margin-bottom: 1em;
|
||||
|
||||
background-color: var(--clr-secondary);
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -105,7 +105,8 @@
|
||||
"search-driver": "Search for driver...",
|
||||
"detailed-timetable": "Detailed timetable for train no. ",
|
||||
"via-title": "Via: ",
|
||||
"no-timetable": "no current timetable"
|
||||
"no-timetable": "no current timetable",
|
||||
"distance-exceeded": "Attention! Due to an internal error, timetables with route distance greater than 200km might be incorrect!"
|
||||
},
|
||||
"journal": {
|
||||
"title": "SCENERY ACTIVITY JOURNAL",
|
||||
|
||||
+2
-1
@@ -105,7 +105,8 @@
|
||||
"search-driver": "Szukaj maszynisty...",
|
||||
"detailed-timetable": "Szczegółowy rozkład jazdy pociągu ",
|
||||
"via-title": "Przez: ",
|
||||
"no-timetable": "brak rozkładu jazdy"
|
||||
"no-timetable": "brak rozkładu jazdy",
|
||||
"distance-exceeded": "Uwaga! Z powodu wewnętrznego błędu serwera TD2, rozkłady jazdy o kilometrażu powyżej 200km mogą być niepoprawne!"
|
||||
},
|
||||
"journal": {
|
||||
"title": "DZIENNIK AKTYWNOŚCI SCENERII",
|
||||
|
||||
Reference in New Issue
Block a user