This commit is contained in:
2023-11-08 22:03:45 +01:00
parent cbce9af00b
commit 36e9df82b0
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -1,7 +1,11 @@
<template>
<span class="status-badge" :class="statusName" v-if="isOnline">
{{ $t(`status.${statusName}`) }}
{{ dispatcherStatus && dispatcherStatus > 5 ? timestampToString(dispatcherStatus) : '' }}
{{
statusName == 'online' && dispatcherStatus && dispatcherStatus > 5
? timestampToString(dispatcherStatus)
: ''
}}
</span>
<span class="status-badge free" v-else>
@@ -52,6 +56,7 @@ export default defineComponent({
return 'unknown';
default:
if (this.dispatcherStatus >= Date.now() + 25500000) return 'no-limit';
return 'online';
}
}
+1 -1
View File
@@ -122,7 +122,7 @@ export const useStore = defineStore('store', {
if (!state.apiData?.activeSceneries) return [];
return state.apiData?.activeSceneries.reduce((list, scenery) => {
if (scenery.isOnline !== 1 && Date.now() - scenery.lastSeen > 1000 * 60 * 3) return list;
if (scenery.isOnline !== 1 && Date.now() - scenery.lastSeen > 1000 * 60 * 2) return list;
if (scenery.dispatcherStatus == DispatcherStatus.UNKNOWN) return list;
const station = this.stationList.find((s) => s.name === scenery.stationName);