mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Dodano informacje o poc. offline
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<h3 class="user-header section-header">
|
||||
<img :src="icons.user" alt="icon-user" />
|
||||
{{ $t('scenery.users') }}
|
||||
<span class="text--primary">{{ station.onlineInfo?.currentUsers || '0' }}</span> / <span class="text--primary">{{ station.onlineInfo?.maxUsers || '0' }}</span>
|
||||
<span class="text--primary">{{ station.onlineInfo?.currentUsers || '0' }}</span
|
||||
> / <span class="text--primary">{{ station.onlineInfo?.maxUsers || '0' }}</span>
|
||||
</h3>
|
||||
|
||||
<div
|
||||
@@ -41,7 +42,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
setup(props) {
|
||||
const computedStationTrains= computed(() => {
|
||||
const computedStationTrains = computed(() => {
|
||||
if (!props.station) return [];
|
||||
|
||||
const station = props.station as Station;
|
||||
@@ -49,9 +50,7 @@ export default defineComponent({
|
||||
if (!station.onlineInfo.stationTrains) return [];
|
||||
|
||||
return station.onlineInfo.stationTrains.map((train) => {
|
||||
const scheduledTrainStatus = station.onlineInfo?.scheduledTrains?.find(
|
||||
(st) => st.trainNo === train.trainNo
|
||||
);
|
||||
const scheduledTrainStatus = station.onlineInfo?.scheduledTrains?.find((st) => st.trainNo === train.trainNo);
|
||||
|
||||
return {
|
||||
...train,
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="!train.online" style="color: salmon">
|
||||
Offline - {{ lastSeenMessage(train.lastSeen) }}
|
||||
</div>
|
||||
|
||||
<div class="driver_position text--grayed" style="margin-top: 0.25em">
|
||||
<span v-if="train.currentStationHash">
|
||||
{{ $t('trains.current-scenery') }} <span>{{ train['currentStationName'] }} </span>
|
||||
|
||||
Reference in New Issue
Block a user