refactoring: split all the states

This commit is contained in:
Pieter Vander Vennet 2023-03-25 02:48:24 +01:00
parent 4d48b1cf2b
commit 8e2f04c0d0
32 changed files with 411 additions and 395 deletions

View file

@ -3,11 +3,12 @@ import ThemeViewGUI from "./UI/ThemeViewGUI.svelte"
import { FixedUiElement } from "./UI/Base/FixedUiElement"
import { QueryParameters } from "./Logic/Web/QueryParameters"
import { AllKnownLayoutsLazy } from "./Customizations/AllKnownLayouts"
import LayoutConfig from "./Models/ThemeConfig/LayoutConfig"
import * as benches from "./assets/generated/themes/benches.json"
async function main() {
new FixedUiElement("Determining layout...").AttachTo("maindiv")
const qp = QueryParameters.GetQueryParameter("layout", "benches")
const layout = new AllKnownLayoutsLazy().get(qp.data)
const qp = QueryParameters.GetQueryParameter("layout", "")
const layout = new LayoutConfig(<any>benches, true) // qp.data === "" ? : new AllKnownLayoutsLazy().get(qp.data)
console.log("Using layout", layout.id)
new SvelteUIElement(ThemeViewGUI, { layout }).AttachTo("maindiv")
}