From e203cb7a5cdff67957812cb792cc47a6e498e7f5 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 28 Aug 2022 12:17:38 +0200 Subject: [PATCH] replaceState on logout and loading screen while loading user --- frontend/src/lib/logout.ts | 2 +- frontend/src/routes/__layout@root.svelte | 242 ++++++++++++----------- 2 files changed, 128 insertions(+), 116 deletions(-) diff --git a/frontend/src/lib/logout.ts b/frontend/src/lib/logout.ts index 214ab79fd9..81cfbb5702 100644 --- a/frontend/src/lib/logout.ts +++ b/frontend/src/lib/logout.ts @@ -12,7 +12,7 @@ export function logoutWithRedirect(rd?: string): void { ? `error=${encodeURIComponent('You have been logged out because your session has expired.')}&` : '' clearCookies() - goto(`/user/login?${error}${rd ? 'rd=' + encodeURIComponent(rd) : ''}`) + goto(`/user/login?${error}${rd ? 'rd=' + encodeURIComponent(rd) : ''}`, { replaceState: true }) } } diff --git a/frontend/src/routes/__layout@root.svelte b/frontend/src/routes/__layout@root.svelte index 40a5271cb0..788899426d 100644 --- a/frontend/src/routes/__layout@root.svelte +++ b/frontend/src/routes/__layout@root.svelte @@ -1,5 +1,5 @@