diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue
index 0d6d0b2..c8c85d7 100644
--- a/src/components/StationsView/StationTable.vue
+++ b/src/components/StationsView/StationTable.vue
@@ -4,17 +4,6 @@
-
-
-
-
@@ -117,11 +80,9 @@
- {{ station.occupiedTo }}
+ {{
+ $t(`status.${station.statusID}`)
+ }}
diff --git a/src/components/TrainsView/TrainSchedule.vue b/src/components/TrainsView/TrainSchedule.vue
index 1355279..df8388f 100644
--- a/src/components/TrainsView/TrainSchedule.vue
+++ b/src/components/TrainsView/TrainSchedule.vue
@@ -12,17 +12,6 @@
delayed: stop.departureDelay > 0,
}"
>
-
-
-
diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue
index 2ef97a8..9d49e77 100644
--- a/src/components/TrainsView/TrainTable.vue
+++ b/src/components/TrainsView/TrainTable.vue
@@ -1,7 +1,7 @@
- Ups! Brak pociągów do wyświetlenia :/
+ {{ $t("trains.no-trains") }}
@@ -50,7 +50,7 @@
SRJP
- Szczegółowy rozkład jazdy pociągu {{ train.trainNo }}
+ {{ $t("trains.detailed-timetable") }} {{ train.trainNo }}
@@ -65,7 +65,7 @@
- Przez:
+ {{ $t("trains.via-title") }}
This functionality is unfinished! Information shown here could be false or incorrect!",
"select": "Select a scenery"
+ },
+ "scenery": {
+ "users": "PLAYERS ONLINE",
+ "spawns": "OPEN SPAWNS",
+ "timetables": "ACTIVE TIMETABLES",
+ "no-timetables": "No active timetables!",
+ "no-users": "NO ACTIVE PLAYERS",
+ "no-spawns": "NO OPEN SPAWNS",
+ "no-scenery": "Oops! This scenery doesn't exist or is offline!",
+ "return-btn": "Return to main site"
+ },
+ "timetables": {
+ "online": "At station",
+ "departed": "Dispatched",
+ "departed-away": "Departed",
+ "arriving": "En route",
+ "stopped": "Stopped",
+ "terminated": "Terminated"
}
}
diff --git a/src/lang/pl.json b/src/lang/pl.json
index 597d39f..7f2d696 100644
--- a/src/lang/pl.json
+++ b/src/lang/pl.json
@@ -2,7 +2,18 @@
"app": {
"sceneries": "SCENERIE",
"trains": "POCIĄGI",
- "journal": "DZIENNIK"
+ "journal": "DZIENNIK",
+ "loading": "Pobieranie danych..."
+ },
+ "descs": {},
+ "status": {
+ "free": "WOLNA",
+ "ending": "KOŃCZY",
+ "not-signed": "NIEZALOGOWANY",
+ "no-limit": "BEZ LIMITU",
+ "unavailable": "NIEDOSTĘPNY",
+ "brb": "Z/W",
+ "no-space": "BRAK MIEJSCA"
},
"options": {
"filters": "FILTRY",
@@ -48,6 +59,7 @@
"timetables": "Aktywne rozkłady jazdy"
},
"trains": {
+ "no-trains": "Ups! Brak pociągów online!",
"stats": "STATYSTYKI RUCHU",
"stats-speed": "PRĘDKOŚCI POCIĄGÓW (MIN | ŚR | MAX) [km/h]",
"stats-length": "DŁUGOŚCI ROZKŁADÓW (MIN | ŚR | MAX) [km]",
@@ -62,12 +74,31 @@
"option-timetable": "numer pociagu",
"search-no": "Szukaj nr pociągu...",
"search-driver": "Szukaj maszynisty...",
- "detailed-timetable": "Szczegółowy rozkład jazdy pociągu "
+ "detailed-timetable": "Szczegółowy rozkład jazdy pociągu ",
+ "via-title": "Przez: "
},
"journal": {
"title": "DZIENNIK AKTYWNOŚCI SCENERII",
"subtitle": "Pokazuje dyżurnych, którzy ostatnio byli aktywni na wybranej scenerii",
"disclaimer": "Ta funkcjonalność jest w testach beta! Informacje pokazywane na ekranie mogą znikać, a ich zawartość może być fałszywa!",
"select": "Wybierz scenerię"
+ },
+ "scenery": {
+ "users": "GRACZE ONLINE",
+ "spawns": "OTWARTE SPAWNY",
+ "timetables": "AKTYWNE ROZKŁADY JAZDY",
+ "no-timetables": "Brak aktywnych rozkładów!",
+ "no-users": "BRAK AKTYWNYCH GRACZY",
+ "no-spawns": "BRAK OTWARTYCH SPAWNÓW",
+ "no-scenery": "Ups! Nie znaleziono danej stacji bądź jest ona offline!",
+ "return-btn": "Wróć na stronę główną"
+ },
+ "timetables": {
+ "online": "Na stacji",
+ "departed": "Odprawiony",
+ "departed-away": "Odjechał",
+ "arriving": "W drodze",
+ "stopped": "Postój",
+ "terminated": "Skończył bieg"
}
}
diff --git a/src/scripts/interfaces/Station.ts b/src/scripts/interfaces/Station.ts
index 5019aa7..b2cd5e0 100644
--- a/src/scripts/interfaces/Station.ts
+++ b/src/scripts/interfaces/Station.ts
@@ -47,8 +47,9 @@ export default interface Station {
stops: string[] | null;
online: boolean;
- occupiedTo: string;
+ // occupiedTo: string;
statusTimestamp: number;
+ statusID: string;
stationTrains: Train[];
scheduledTrains: ScheduledTrain[];
diff --git a/src/scripts/stationFilterManager.ts b/src/scripts/stationFilterManager.ts
index 60220c0..96a4510 100644
--- a/src/scripts/stationFilterManager.ts
+++ b/src/scripts/stationFilterManager.ts
@@ -36,7 +36,7 @@ export default class StationFilterManager {
.filter(station => {
if ((station.nonPublic || !station.reqLevel) && this.filters['nonPublic']) return false;
- if (station.online && station.occupiedTo == 'KOŃCZY' && this.filters['ending']) return false;
+ if (station.online && station.statusID == 'ending' && this.filters['ending']) return false;
if (station.online && this.filters['occupied']) return false;
if (!station.online && this.filters['free']) return false;
diff --git a/src/store/store.ts b/src/store/store.ts
index 8207f86..6a7f2a3 100644
--- a/src/store/store.ts
+++ b/src/store/store.ts
@@ -39,6 +39,35 @@ const URLs = {
const timetableURL = (trainNo: number) => `https://api.td2.info.pl:9640/?method=readFromSWDR&value=getTimetable%3B${trainNo}%3Beu`;
const getLocoURL = (locoType: string) => `https://rj.td2.info.pl/dist/img/thumbnails/${locoType.includes('EN') ? locoType + 'rb' : locoType}.png`;
+const getStatusID = (stationStatus: any) => {
+ if (!stationStatus) return 'not-signed';
+
+ const statusCode = stationStatus[2];
+ const statusTimestamp = stationStatus[3];
+
+ switch (statusCode) {
+ case 0:
+ if (statusTimestamp - Date.now() > 21000000) return 'no-limit';
+
+ return 'online';
+
+ case 1:
+ return 'brb';
+
+ case 2:
+ if (statusTimestamp == 0) return 'ending';
+ break;
+
+ case 3:
+ return 'no-space';
+
+ default:
+ break;
+ }
+
+ return 'unavailable';
+};
+
const getStatusLabel = (stationStatus: any) => {
if (!stationStatus) return 'NIEZALOGOWANY';
@@ -265,8 +294,8 @@ export default class Store extends VuexModule {
const stationStatus = onlineDispatchersData.find(status => status[0] == station.stationHash && status[1] == 'eu');
- const statusLabel = getStatusLabel(stationStatus);
const statusTimestamp = getStatusTimestamp(stationStatus);
+ const statusID = getStatusID(stationStatus);
const stationTrains = onlineTrainsData.filter(
train => train.region === 'eu' && train.isOnline && train.station.stationName === station.stationName
@@ -283,9 +312,9 @@ export default class Store extends VuexModule {
dispatcherId: station.dispatcherId,
dispatcherExp: station.dispatcherExp,
dispatcherIsSupporter: station.dispatcherIsSupporter,
- occupiedTo: statusLabel,
stationTrains,
statusTimestamp,
+ statusID,
});
return acc;
@@ -398,8 +427,8 @@ export default class Store extends VuexModule {
dispatcherId: 0,
dispatcherIsSupporter: false,
online: false,
- occupiedTo: 'WOLNA',
statusTimestamp: -3,
+ statusID: 'free',
stationTrains: [],
scheduledTrains: [],
spawns: [],
@@ -479,7 +508,7 @@ export default class Store extends VuexModule {
dispatcherId: 0,
dispatcherIsSupporter: false,
online: false,
- occupiedTo: 'WOLNA',
+ statusID: 'free',
statusTimestamp: -3,
stationTrains: [],
scheduledTrains: [],
diff --git a/src/views/HistoryView.vue b/src/views/HistoryView.vue
index c040db8..b64f164 100644
--- a/src/views/HistoryView.vue
+++ b/src/views/HistoryView.vue
@@ -2,9 +2,9 @@
diff --git a/src/views/SceneryView.vue b/src/views/SceneryView.vue
index 68c0e04..b2ef340 100644
--- a/src/views/SceneryView.vue
+++ b/src/views/SceneryView.vue
@@ -4,9 +4,9 @@
class="scenery-offline"
v-if="!stationInfo && dataStatus == 2 && currentPath === '/scenery'"
>
- Ups! Nie znaleziono danej stacji bądź jest ona offline!
+ {{ $t("scenery.no-scenery") }}
- Wróć na stronę główną
+ {{ $t("scenery.return-btn") }}
@@ -109,9 +109,9 @@ h3 {
&-offline {
align-self: center;
- font-size: 2em;
+ font-size: 1.5em;
text-align: center;
- padding: 0 1em;
+ padding: 2em 1em;
color: $warningCol;
diff --git a/src/views/StationsView.vue b/src/views/StationsView.vue
index 9e5adae..dcb3f32 100644
--- a/src/views/StationsView.vue
+++ b/src/views/StationsView.vue
@@ -18,11 +18,11 @@
{{ $t("options.filters") }}
-
+