mapcomplete/index.ts

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

22 lines
744 B
TypeScript
Raw Normal View History

import { Utils } from "./Utils"
import DetermineLayout from "./Logic/DetermineLayout"
2023-04-13 23:40:28 +02:00
import ThemeViewState from "./Models/ThemeViewState"
import SvelteUIElement from "./UI/Base/SvelteUIElement"
import ThemeViewGUI from "./UI/ThemeViewGUI.svelte"
2023-06-07 17:33:07 +02:00
import {FixedUiElement} from "./UI/Base/FixedUiElement";
2021-10-15 14:52:11 +02:00
// Miscelleanous
Utils.DisableLongPresses()
2021-12-21 18:35:31 +01:00
// @ts-ignore
DetermineLayout.GetLayout()
2023-04-13 23:40:28 +02:00
.then((layout) => {
const state = new ThemeViewState(layout)
const main = new SvelteUIElement(ThemeViewGUI, { state })
main.AttachTo("maindiv")
2022-01-26 21:40:38 +01:00
})
.catch((err) => {
console.error("Error while initializing: ", err, err.stack)
2023-06-07 17:33:07 +02:00
new FixedUiElement(err).SetClass("block alert").AttachTo("maindiv")
2022-01-26 21:40:38 +01:00
})