mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
hotfixy
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="status-badge" :class="statusName" v-if="isOnline">
|
<span class="status-badge" :class="statusName" v-if="isOnline">
|
||||||
{{ $t(`status.${statusName}`) }}
|
{{ $t(`status.${statusName}`) }}
|
||||||
{{ dispatcherStatus && dispatcherStatus > 5 ? timestampToString(dispatcherStatus) : '' }}
|
{{
|
||||||
|
statusName == 'online' && dispatcherStatus && dispatcherStatus > 5
|
||||||
|
? timestampToString(dispatcherStatus)
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="status-badge free" v-else>
|
<span class="status-badge free" v-else>
|
||||||
@@ -52,6 +56,7 @@ export default defineComponent({
|
|||||||
return 'unknown';
|
return 'unknown';
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
if (this.dispatcherStatus >= Date.now() + 25500000) return 'no-limit';
|
||||||
return 'online';
|
return 'online';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -122,7 +122,7 @@ export const useStore = defineStore('store', {
|
|||||||
if (!state.apiData?.activeSceneries) return [];
|
if (!state.apiData?.activeSceneries) return [];
|
||||||
|
|
||||||
return state.apiData?.activeSceneries.reduce((list, scenery) => {
|
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;
|
if (scenery.dispatcherStatus == DispatcherStatus.UNKNOWN) return list;
|
||||||
|
|
||||||
const station = this.stationList.find((s) => s.name === scenery.stationName);
|
const station = this.stationList.find((s) => s.name === scenery.stationName);
|
||||||
|
|||||||
Reference in New Issue
Block a user