Reformat all files with prettier

This commit is contained in:
Pieter Vander Vennet 2022-09-08 21:40:48 +02:00
parent e22d189376
commit b541d3eab4
382 changed files with 50893 additions and 35566 deletions

View file

@ -1,32 +1,47 @@
import {Utils} from "./Utils";
import AllThemesGui from "./UI/AllThemesGui";
import {QueryParameters} from "./Logic/Web/QueryParameters";
import StatisticsGUI from "./UI/StatisticsGUI";
import {FixedUiElement} from "./UI/Base/FixedUiElement";
import { Utils } from "./Utils"
import AllThemesGui from "./UI/AllThemesGui"
import { QueryParameters } from "./Logic/Web/QueryParameters"
import StatisticsGUI from "./UI/StatisticsGUI"
import { FixedUiElement } from "./UI/Base/FixedUiElement"
const layout = QueryParameters.GetQueryParameter("layout", undefined).data ?? ""
const customLayout = QueryParameters.GetQueryParameter("userlayout", undefined).data ?? ""
const l = window.location;
const l = window.location
if (layout !== "") {
if (window.location.host.startsWith("127.0.0.1")) {
window.location.replace(l.protocol + "//" + window.location.host + "/theme.html" + l.search + "&layout=" + layout + l.hash);
window.location.replace(
l.protocol +
"//" +
window.location.host +
"/theme.html" +
l.search +
"&layout=" +
layout +
l.hash
)
} else {
window.location.replace(l.protocol + "//" + window.location.host + "/" + layout + ".html" + l.search + l.hash);
window.location.replace(
l.protocol + "//" + window.location.host + "/" + layout + ".html" + l.search + l.hash
)
}
} else if (customLayout !== "") {
window.location.replace(l.protocol + "//" + window.location.host + "/theme.html" + l.search + l.hash);
window.location.replace(
l.protocol + "//" + window.location.host + "/theme.html" + l.search + l.hash
)
}
Utils.DisableLongPresses()
document.getElementById("decoration-desktop").remove();
const mode = QueryParameters.GetQueryParameter("mode", "map", "The mode the application starts in, e.g. 'statistics'")
document.getElementById("decoration-desktop").remove()
const mode = QueryParameters.GetQueryParameter(
"mode",
"map",
"The mode the application starts in, e.g. 'statistics'"
)
if (mode.data === "statistics") {
console.log("Statistics mode!")
new FixedUiElement("").AttachTo("centermessage")
new StatisticsGUI().SetClass("w-full h-full pointer-events-auto").AttachTo("topleft-tools")
} else{
new AllThemesGui().setup();
} else {
new AllThemesGui().setup()
}