forked from MapComplete/MapComplete
Add dashboard mode to compiled theme pages
This commit is contained in:
parent
64d0aac88f
commit
bc2f421108
1 changed files with 8 additions and 4 deletions
|
@ -10,9 +10,7 @@ import State from "./State";
|
||||||
import AvailableBaseLayersImplementation from "./Logic/Actors/AvailableBaseLayersImplementation";
|
import AvailableBaseLayersImplementation from "./Logic/Actors/AvailableBaseLayersImplementation";
|
||||||
import ShowOverlayLayerImplementation from "./UI/ShowDataLayer/ShowOverlayLayerImplementation";
|
import ShowOverlayLayerImplementation from "./UI/ShowDataLayer/ShowOverlayLayerImplementation";
|
||||||
import {DefaultGuiState} from "./UI/DefaultGuiState";
|
import {DefaultGuiState} from "./UI/DefaultGuiState";
|
||||||
|
import DashboardGui from "./UI/DashboardGui";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.getElementById("decoration-desktop").remove();
|
document.getElementById("decoration-desktop").remove();
|
||||||
|
@ -62,4 +60,10 @@ DefaultGuiState.state = guiState;
|
||||||
// This 'leaks' the global state via the window object, useful for debugging
|
// This 'leaks' the global state via the window object, useful for debugging
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
window.mapcomplete_state = State.state;
|
window.mapcomplete_state = State.state;
|
||||||
|
|
||||||
|
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()
|
new DefaultGUI(State.state, guiState).setup()
|
||||||
|
}
|
Loading…
Reference in a new issue