mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 22:08:12 +00:00
chore: entry details backwards comp.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="details-actions">
|
<div class="details-actions">
|
||||||
<button class="btn--action" @click="toggleExtraInfo">
|
<button class="btn--action" @click="toggleExtraInfo">
|
||||||
<b>{{ $t('journal.stock-info') }}</b>
|
<b>{{ $t('journal.entry-details') }}</b>
|
||||||
<img :src="`/images/icon-arrow-${showExtraInfo ? 'asc' : 'desc'}.svg`" alt="Arrow icon" />
|
<img :src="`/images/icon-arrow-${showExtraInfo ? 'asc' : 'desc'}.svg`" alt="Arrow icon" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -16,18 +16,18 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="details-body" v-if="timetable.stockString && timetable.stockMass && showExtraInfo">
|
<div class="details-body" v-if="showExtraInfo">
|
||||||
<hr />
|
<hr />
|
||||||
<EntryStops :timetable="timetable" />
|
<EntryStops :timetable="timetable" />
|
||||||
|
|
||||||
<div class="stock-specs">
|
<div class="stock-specs" v-if="timetable.authorName">
|
||||||
<span class="badge">
|
<span class="badge">
|
||||||
<span>{{ $t('journal.dispatcher-name') }}</span>
|
<span>{{ $t('journal.dispatcher-name') }}</span>
|
||||||
<span>{{ timetable.authorName }}</span>
|
<span>{{ timetable.authorName }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="stock-specs">
|
<div class="stock-specs" v-if="timetable.stockMass && timetable.stockHistory.length > 0">
|
||||||
<span class="badge">
|
<span class="badge">
|
||||||
<span>{{ $t('journal.stock-max-speed') }}</span>
|
<span>{{ $t('journal.stock-max-speed') }}</span>
|
||||||
<span>{{ timetable.maxSpeed }}km/h</span>
|
<span>{{ timetable.maxSpeed }}km/h</span>
|
||||||
@@ -71,14 +71,16 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<StockList
|
<div v-if="timetable.stockString">
|
||||||
:trainStockList="
|
<StockList
|
||||||
(currentHistoryIndex == 0
|
:trainStockList="
|
||||||
? timetable.stockString
|
(currentHistoryIndex == 0
|
||||||
: stockHistory[currentHistoryIndex].stockString
|
? timetable.stockString
|
||||||
).split(';')
|
: stockHistory[currentHistoryIndex].stockString
|
||||||
"
|
).split(';')
|
||||||
/>
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="timetable.twr">TWR: {{ timetable.warningNotes }}</div>
|
<div v-if="timetable.twr">TWR: {{ timetable.warningNotes }}</div>
|
||||||
|
|||||||
@@ -124,13 +124,17 @@ export default defineComponent({
|
|||||||
const [arrival, name, departure] = pathEl.split(',');
|
const [arrival, name, departure] = pathEl.split(',');
|
||||||
const sceneryName = name.split(' ').slice(0, -1).join(' ');
|
const sceneryName = name.split(' ').slice(0, -1).join(' ');
|
||||||
const sceneryHash = name.split(' ').pop()?.replace('.sc', '') ?? '';
|
const sceneryHash = name.split(' ').pop()?.replace('.sc', '') ?? '';
|
||||||
|
const isVisited = this.timetable.visitedSceneries.includes(sceneryHash);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
arrival,
|
arrival,
|
||||||
sceneryName,
|
sceneryName,
|
||||||
sceneryHash,
|
sceneryHash,
|
||||||
departure,
|
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);
|
: timetable.checkpointDeparturesScheduled.at(i);
|
||||||
|
|
||||||
const stopTime = Number(timetable.checkpointStopTypes.at(i)?.split(',')[0]) || 0;
|
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({
|
acc.push({
|
||||||
stopName,
|
stopName,
|
||||||
@@ -209,6 +213,10 @@ export default defineComponent({
|
|||||||
&[data-confirmed='true'] > .stop-name {
|
&[data-confirmed='true'] > .stop-name {
|
||||||
color: lightgreen;
|
color: lightgreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[data-confirmed='true'] > .stop-date:not([data-preponed='true']):not([data-delayed='true']) {
|
||||||
|
color: lightgreen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.stop-name {
|
.stop-name {
|
||||||
@@ -217,6 +225,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stop-date {
|
.stop-date {
|
||||||
|
color: #ccc;
|
||||||
|
|
||||||
s {
|
s {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
@@ -226,7 +236,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
&[data-preponed='true'] {
|
&[data-preponed='true'] {
|
||||||
color: lightgreen;
|
color: mediumspringgreen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -456,7 +456,8 @@
|
|||||||
"minutes": "{value} min | {value} mins",
|
"minutes": "{value} min | {value} mins",
|
||||||
"seconds": "{value} s",
|
"seconds": "{value} s",
|
||||||
|
|
||||||
"stock-info": "DETAILS",
|
"entry-details": "DETAILS",
|
||||||
|
"no-entry-details": "NO DETAILS AVAILABLE",
|
||||||
"stock-length": "Length",
|
"stock-length": "Length",
|
||||||
"stock-mass": "Mass",
|
"stock-mass": "Mass",
|
||||||
"stock-max-speed": "Max. speed",
|
"stock-max-speed": "Max. speed",
|
||||||
|
|||||||
+3
-2
@@ -394,7 +394,6 @@
|
|||||||
|
|
||||||
"driver-not-found-header": "Nie znaleziono pociągu! :/",
|
"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-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-desc-2": "Historię rozkładów jazdy możesz przejrzeć w",
|
||||||
"driver-not-found-journal": "DZIENNIKU RJ",
|
"driver-not-found-journal": "DZIENNIKU RJ",
|
||||||
"driver-not-found-others": "Gracz {driver} jest online jako:",
|
"driver-not-found-others": "Gracz {driver} jest online jako:",
|
||||||
@@ -442,7 +441,9 @@
|
|||||||
"timetable-abandoned": "PORZUCONY",
|
"timetable-abandoned": "PORZUCONY",
|
||||||
"timetable-online-button": "RJ ONLINE",
|
"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-length": "Długość",
|
||||||
"stock-mass": "Masa",
|
"stock-mass": "Masa",
|
||||||
"stock-max-speed": "Prędkość maks.",
|
"stock-max-speed": "Prędkość maks.",
|
||||||
|
|||||||
@@ -227,6 +227,10 @@ a.a-button {
|
|||||||
&:hover {
|
&:hover {
|
||||||
background-color: #424242;
|
background-color: #424242;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.btn--option {
|
&.btn--option {
|
||||||
|
|||||||
Reference in New Issue
Block a user