diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue index 247c85b..63f042b 100644 --- a/src/components/StationsView/StationTable.vue +++ b/src/components/StationsView/StationTable.vue @@ -287,7 +287,7 @@ export default defineComponent({ const data: ComputedRef = computed(() => store.getters[GETTERS.allData]); const isDataLoaded = computed(() => { - return data.value.sceneryDataStatus == DataStatus.Loaded; + return data.value.sceneryDataStatus != DataStatus.Loading; }); return { diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue index a66cf3b..ee3ba3f 100644 --- a/src/components/TrainsView/TrainTable.vue +++ b/src/components/TrainsView/TrainTable.vue @@ -6,7 +6,7 @@ {{ $t('trains.distance-exceeded') }} --> -
+
{{ $t('trains.no-trains') }}
diff --git a/src/store/index.ts b/src/store/index.ts index 3141aaf..a82a88e 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -101,6 +101,9 @@ export const store = createStore({ async fetchOnlineData({ commit }, data: APIData) { if (!data.stations) { commit(MUTATIONS.SET_SCENERY_DATA_STATUS, DataStatus.Error); + commit(MUTATIONS.SET_TRAINS_DATA_STATUS, DataStatus.Error); + commit(MUTATIONS.SET_DISPATCHER_DATA_STATUS, DataStatus.Error); + return; }