Chore: linting

This commit is contained in:
Pieter Vander Vennet 2024-04-13 02:40:21 +02:00
parent 4625ad9a5c
commit 097141f944
307 changed files with 5346 additions and 2147 deletions

View file

@ -31,7 +31,7 @@ async function getAvailableLayers(): Promise<Set<string>> {
const host = new URL(Constants.VectorTileServer).host
const status: { layers: string[] } = await Promise.any([
// Utils.downloadJson("https://" + host + "/summary/status.json"),
timeout(0)
timeout(0),
])
return new Set<string>(status.layers)
} catch (e) {
@ -48,13 +48,13 @@ async function main() {
}
const [layout, availableLayers] = await Promise.all([
DetermineLayout.GetLayout(),
await getAvailableLayers()
await getAvailableLayers(),
])
console.log("The available layers on server are", Array.from(availableLayers))
const state = new ThemeViewState(layout, availableLayers)
const main = new SvelteUIElement(ThemeViewGUI, { state })
main.AttachTo("maindiv")
Array.from(document.getElementsByClassName("delete-on-load")).forEach(el => {
Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => {
el.parentElement.removeChild(el)
})
} catch (err) {
@ -65,17 +65,16 @@ async function main() {
customDefinition?.length > 0
? new SubtleButton(new SvelteUIElement(Download), "Download the raw file").onClick(
() =>
Utils.offerContentsAsDownloadableFile(
DetermineLayout.getCustomDefinition(),
"mapcomplete-theme.json",
{ mimetype: "application/json" }
)
)
: undefined
() =>
Utils.offerContentsAsDownloadableFile(
DetermineLayout.getCustomDefinition(),
"mapcomplete-theme.json",
{ mimetype: "application/json" }
)
)
: undefined,
]).AttachTo("maindiv")
}
}
main().then((_) => {
})
main().then((_) => {})