From f4b0c391850645a07bce278fd22c744edb1d31f4 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 3 Sep 2024 15:18:59 +0200 Subject: [PATCH] chore: entry details backwards comp. --- .../JournalTimetables/EntryDetails.vue | 26 ++++++++++--------- .../JournalTimetables/EntryStops.vue | 16 +++++++++--- src/locales/en.json | 3 ++- src/locales/pl.json | 5 ++-- src/styles/global.scss | 4 +++ 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/src/components/JournalView/JournalTimetables/EntryDetails.vue b/src/components/JournalView/JournalTimetables/EntryDetails.vue index 99d19af..14f8c48 100644 --- a/src/components/JournalView/JournalTimetables/EntryDetails.vue +++ b/src/components/JournalView/JournalTimetables/EntryDetails.vue @@ -2,7 +2,7 @@
@@ -16,18 +16,18 @@
-
+

-
+
{{ $t('journal.dispatcher-name') }} {{ timetable.authorName }}
-
+
{{ $t('journal.stock-max-speed') }} {{ timetable.maxSpeed }}km/h @@ -71,14 +71,16 @@
- +
+ +
TWR: {{ timetable.warningNotes }}
diff --git a/src/components/JournalView/JournalTimetables/EntryStops.vue b/src/components/JournalView/JournalTimetables/EntryStops.vue index e6ef0c1..2b27038 100644 --- a/src/components/JournalView/JournalTimetables/EntryStops.vue +++ b/src/components/JournalView/JournalTimetables/EntryStops.vue @@ -124,13 +124,17 @@ export default defineComponent({ const [arrival, name, departure] = pathEl.split(','); const sceneryName = name.split(' ').slice(0, -1).join(' '); const sceneryHash = name.split(' ').pop()?.replace('.sc', '') ?? ''; + const isVisited = this.timetable.visitedSceneries.includes(sceneryHash); return { arrival, sceneryName, sceneryHash, departure, - isVisited: this.timetable.visitedSceneries?.includes(sceneryHash) ?? false + isVisited, + isVisitedOffline: + !isVisited && + this.timetable.visitedSceneries.includes(`${sceneryName} ${sceneryHash}.sc`) }; }); }, @@ -162,7 +166,7 @@ export default defineComponent({ : timetable.checkpointDeparturesScheduled.at(i); const stopTime = Number(timetable.checkpointStopTypes.at(i)?.split(',')[0]) || 0; - const stopType = timetable.checkpointStopTypes.at(i)?.split(',')[1] || ''; + const stopType = timetable.checkpointStopTypes.at(i)?.split(',').slice(1).join(',') || 'pt'; acc.push({ stopName, @@ -209,6 +213,10 @@ export default defineComponent({ &[data-confirmed='true'] > .stop-name { color: lightgreen; } + + &[data-confirmed='true'] > .stop-date:not([data-preponed='true']):not([data-delayed='true']) { + color: lightgreen; + } } .stop-name { @@ -217,6 +225,8 @@ export default defineComponent({ } .stop-date { + color: #ccc; + s { color: #aaa; } @@ -226,7 +236,7 @@ export default defineComponent({ } &[data-preponed='true'] { - color: lightgreen; + color: mediumspringgreen; } } diff --git a/src/locales/en.json b/src/locales/en.json index dd05e22..5ddc8ec 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -456,7 +456,8 @@ "minutes": "{value} min | {value} mins", "seconds": "{value} s", - "stock-info": "DETAILS", + "entry-details": "DETAILS", + "no-entry-details": "NO DETAILS AVAILABLE", "stock-length": "Length", "stock-mass": "Mass", "stock-max-speed": "Max. speed", diff --git a/src/locales/pl.json b/src/locales/pl.json index 94bd3b7..429a8a9 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -394,7 +394,6 @@ "driver-not-found-header": "Nie znaleziono pociągu! :/", "driver-not-found-desc-1": "Ten pociąg prawdopodobnie zakończył już swój bieg, zmienił numer lub jest offline.", - "driver-not-found-desc-1": "Ten pociąg prawdopodobnie zakończył już swój bieg, zmienił numer lub jest offline.", "driver-not-found-desc-2": "Historię rozkładów jazdy możesz przejrzeć w", "driver-not-found-journal": "DZIENNIKU RJ", "driver-not-found-others": "Gracz {driver} jest online jako:", @@ -442,7 +441,9 @@ "timetable-abandoned": "PORZUCONY", "timetable-online-button": "RJ ONLINE", - "stock-info": "SZCZEGÓŁY", + "entry-details": "SZCZEGÓŁY", + "no-entry-details": "BRAK DOSTĘPNYCH SZCZEGÓŁÓW", + "stock-length": "Długość", "stock-mass": "Masa", "stock-max-speed": "Prędkość maks.", diff --git a/src/styles/global.scss b/src/styles/global.scss index 0a8c6e5..4c4519a 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -227,6 +227,10 @@ a.a-button { &:hover { background-color: #424242; } + + &:disabled { + opacity: 0.75; + } } &.btn--option {