diff --git a/packages/shared/components/ProgressBar.svelte b/packages/shared/components/ProgressBar.svelte index 9ea005d0369..7885ae68f7f 100644 --- a/packages/shared/components/ProgressBar.svelte +++ b/packages/shared/components/ProgressBar.svelte @@ -1,5 +1,5 @@ @@ -13,11 +13,15 @@ .progress { transition: width 0.25s; } + + .message { + z-index: 1; + }
- {message} + {message}
diff --git a/packages/shared/lib/networkStatus.ts b/packages/shared/lib/networkStatus.ts index 15d61ad28ad..eb0900b4e0d 100644 --- a/packages/shared/lib/networkStatus.ts +++ b/packages/shared/lib/networkStatus.ts @@ -52,6 +52,8 @@ export async function fetchNetworkStatus(): Promise { }, } + let updated = false + for (let index = 0; index < NETWORK_STATUS_ENDPOINTS.length; index++) { const endpoint = NETWORK_STATUS_ENDPOINTS[index] @@ -75,9 +77,22 @@ export async function fetchNetworkStatus(): Promise { networkStatus.set(statusData) + updated = true + break } catch (err) { console.error(err.name === "AbortError" ? new Error(`Could not fetch from ${endpoint}.`) : err) } } + + if (!updated) { + networkStatus.set({ + itemsPerSecond: 0, + confirmedItemsPerSecond: 0, + confirmationRate: 0, + latestMilestoneIndex: 0, + latestMilestoneIndexTime: 0, + health: 0 + }) + } }