From db6760015f69239dc51cc47c866635927cd9dadf Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 4 May 2023 23:38:32 +0200 Subject: [PATCH] Fix: use theme.html?layout= instead of layout.html if a local deploy is detected --- UI/BigComponents/ThemeButton.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/BigComponents/ThemeButton.svelte b/UI/BigComponents/ThemeButton.svelte index 143168698e..80888e85e2 100644 --- a/UI/BigComponents/ThemeButton.svelte +++ b/UI/BigComponents/ThemeButton.svelte @@ -49,7 +49,8 @@ } let linkPrefix = `${path}/${layout.id.toLowerCase()}.html?` - if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { + if (location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.port === "1234") { + // Redirect to 'theme.html?layout=* instead of 'layout.html'. This is probably a debug run, where the routing does not work linkPrefix = `${path}/theme.html?layout=${layout.id}&` }