mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix(web): flash of disconnected api state on page load
Changes initial unraidApiStatus to connecting instead of offline. This prevents a flash of the offline state on page loads and navigation.
This commit is contained in:
committed by
Eli Bosley
parent
74b3e29c74
commit
d0819b8d02
@@ -1,4 +1,4 @@
|
||||
import { type ApolloClient as ApolloClientType, type NormalizedCacheObject } from '@apollo/client';
|
||||
import type { ApolloClient as ApolloClientType, NormalizedCacheObject } from '@apollo/client';
|
||||
import { ArrowPathIcon } from '@heroicons/vue/24/solid';
|
||||
import { WebguiUnraidApiCommand } from '~/composables/services/webgui';
|
||||
import { client } from '~/helpers/create-apollo-client';
|
||||
@@ -20,7 +20,7 @@ export const useUnraidApiStore = defineStore('unraidApi', () => {
|
||||
const unraidApiClient = ref<ApolloClientType<NormalizedCacheObject> | null>(client);
|
||||
|
||||
// const unraidApiErrors = ref<any[]>([]);
|
||||
const unraidApiStatus = ref<'connecting' | 'offline' | 'online' | 'restarting'>('offline');
|
||||
const unraidApiStatus = ref<'connecting' | 'offline' | 'online' | 'restarting'>('connecting');
|
||||
const prioritizeCorsError = ref(false); // Ensures we don't overwrite this specific error message with a non-descriptive network error message
|
||||
|
||||
const offlineError = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user