mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
hotfix: lastSeen data filtering synchronization
This commit is contained in:
@@ -23,7 +23,10 @@
|
||||
<span class="user_name">
|
||||
{{ train.driverName }}
|
||||
<i
|
||||
v-if="train.timetableData != undefined && train.lastSeen <= Date.now() - 120000"
|
||||
v-if="
|
||||
train.timetableData != undefined &&
|
||||
(train.lastSeen <= Date.now() - 60000 || !train.online)
|
||||
"
|
||||
class="fa-solid fa-user-slash"
|
||||
style="color: lightcoral"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
|
||||
@@ -42,8 +42,13 @@ export const useMainStore = defineStore('mainStore', {
|
||||
checkpointsTrains.clear();
|
||||
sceneriesTrains.clear();
|
||||
|
||||
return (apiStore.activeData?.trains ?? [])
|
||||
.filter((train) => train.timetable || train.lastSeen >= Date.now() - 60000)
|
||||
const dateNow = new Date();
|
||||
|
||||
const x = (apiStore.activeData?.trains ?? [])
|
||||
.filter(
|
||||
(train) =>
|
||||
train.timetable || train.lastSeen >= dateNow.getTime() - 60000 || train.online == 1
|
||||
)
|
||||
.map((train) => {
|
||||
const stock = train.stockString.split(';');
|
||||
const locoType = stock ? stock[0] : train.stockString;
|
||||
@@ -163,6 +168,8 @@ export const useMainStore = defineStore('mainStore', {
|
||||
|
||||
return trainObj;
|
||||
});
|
||||
|
||||
return x;
|
||||
},
|
||||
|
||||
// computed active sceneries
|
||||
|
||||
Reference in New Issue
Block a user