mapcomplete/test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
816 B
TypeScript
Raw Normal View History

import SvelteUIElement from "./UI/Base/SvelteUIElement"
2023-03-24 19:21:15 +01:00
import ThemeViewGUI from "./UI/ThemeViewGUI.svelte"
import { FixedUiElement } from "./UI/Base/FixedUiElement"
2023-03-24 19:21:15 +01:00
import { QueryParameters } from "./Logic/Web/QueryParameters"
2023-03-25 02:48:24 +01:00
import LayoutConfig from "./Models/ThemeConfig/LayoutConfig"
import * as benches from "./assets/generated/themes/benches.json"
async function main() {
2023-03-24 19:21:15 +01:00
new FixedUiElement("Determining layout...").AttachTo("maindiv")
2023-03-25 02:48:24 +01:00
const qp = QueryParameters.GetQueryParameter("layout", "")
new FixedUiElement("").AttachTo("extradiv")
2023-03-25 02:48:24 +01:00
const layout = new LayoutConfig(<any>benches, true) // qp.data === "" ? : new AllKnownLayoutsLazy().get(qp.data)
2023-03-24 19:21:15 +01:00
console.log("Using layout", layout.id)
new SvelteUIElement(ThemeViewGUI, { layout }).AttachTo("maindiv")
}
main().then((_) => {})