diff --git a/index_theme.ts.template b/index_theme.ts.template index 8542c9780..dbb7e473d 100644 --- a/index_theme.ts.template +++ b/index_theme.ts.template @@ -10,9 +10,7 @@ import State from "./State"; import AvailableBaseLayersImplementation from "./Logic/Actors/AvailableBaseLayersImplementation"; import ShowOverlayLayerImplementation from "./UI/ShowDataLayer/ShowOverlayLayerImplementation"; import {DefaultGuiState} from "./UI/DefaultGuiState"; - - - +import DashboardGui from "./UI/DashboardGui"; document.getElementById("decoration-desktop").remove(); @@ -62,4 +60,10 @@ DefaultGuiState.state = guiState; // This 'leaks' the global state via the window object, useful for debugging // @ts-ignore window.mapcomplete_state = State.state; -new DefaultGUI(State.state, guiState).setup() + +const mode = QueryParameters.GetQueryParameter("mode", "map", "The mode the application starts in, e.g. 'map' or 'dashboard'") +if(mode.data === "dashboard"){ + new DashboardGui(State.state, guiState).setup() +}else{ + new DefaultGUI(State.state, guiState).setup() +} \ No newline at end of file