Refactoring: use theme instead of layout in a lot of places

This commit is contained in:
Pieter Vander Vennet 2024-10-17 04:06:03 +02:00
parent 9427083939
commit bdc9ba52a6
104 changed files with 445 additions and 449 deletions

View file

@ -1,10 +1,10 @@
import { QueryParameters } from "./Logic/Web/QueryParameters"
import AllThemesGui from "./UI/AllThemesGui.svelte"
const layout = QueryParameters.GetQueryParameter("layout", undefined).data ?? ""
const theme = QueryParameters.GetQueryParameter("layout", undefined).data ?? ""
const customLayout = QueryParameters.GetQueryParameter("userlayout", undefined).data ?? ""
const l = window.location
if (layout !== "") {
if (theme !== "") {
if (window.location.host.startsWith("127.0.0.1")) {
window.location.replace(
l.protocol +
@ -13,12 +13,12 @@ if (layout !== "") {
"/theme.html" +
l.search +
"&layout=" +
layout +
theme +
l.hash
)
} else {
window.location.replace(
l.protocol + "//" + window.location.host + "/" + layout + ".html" + l.search + l.hash
l.protocol + "//" + window.location.host + "/" + theme + ".html" + l.search + l.hash
)
}
} else if (customLayout !== "") {