From 7a26cc5dc86d517bc50492ce4a77c9a82f6acdc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Fri, 28 Jun 2024 20:11:09 +0200 Subject: [PATCH] Loading and logging fixes --- apps/app/layout/app.svelte | 7 +++---- packages/ui/navigation/desktopLoading.svelte | 8 ++++++++ packages/ui/navigation/loading.svelte | 13 ++++++++++--- packages/ui/pages/onboarding.svelte | 9 +++++---- packages/ui/pages/settings.svelte | 3 ++- platforms/windows/service/Program.cs | 2 +- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/apps/app/layout/app.svelte b/apps/app/layout/app.svelte index ba65594..e1d8e6e 100644 --- a/apps/app/layout/app.svelte +++ b/apps/app/layout/app.svelte @@ -137,16 +137,15 @@ ws.onclose = (e) => { console.log("Socket is closed. Reconnecting...", e.reason) setTimeout(() => { - if (retries == 3) { - sessionStorage.clear() - location.reload() + if (retries == 10) { + retries = 0 } connectToWSServer() console.log(`Reconnecting... (Retry #${retries + 1})`) retries++ - }, 1000) + }, 1000 * retries) } } diff --git a/packages/ui/navigation/desktopLoading.svelte b/packages/ui/navigation/desktopLoading.svelte index 4df87d3..c72a381 100644 --- a/packages/ui/navigation/desktopLoading.svelte +++ b/packages/ui/navigation/desktopLoading.svelte @@ -12,6 +12,9 @@