forked from MapComplete/MapComplete
Add 404, fixing custom layouts and redirects
This commit is contained in:
parent
11150a258d
commit
8e2e367a0c
10 changed files with 59 additions and 8258 deletions
|
@ -1,19 +1,18 @@
|
|||
import {FixedUiElement} from "./UI/Base/FixedUiElement";
|
||||
import {QueryParameters} from "./Logic/Web/QueryParameters";
|
||||
import Combine from "./UI/Base/Combine";
|
||||
import AvailableBaseLayers from "./Logic/Actors/AvailableBaseLayers";
|
||||
import MinimapImplementation from "./UI/Base/MinimapImplementation";
|
||||
import {Utils} from "./Utils";
|
||||
import AllThemesGui from "./UI/AllThemesGui";
|
||||
import DetermineLayout from "./Logic/DetermineLayout";
|
||||
import LayoutConfig from "./Models/ThemeConfig/LayoutConfig";
|
||||
import DefaultGUI from "./UI/DefaultGUI";
|
||||
import State from "./State";
|
||||
import AvailableBaseLayersImplementation from "./Logic/Actors/AvailableBaseLayersImplementation";
|
||||
import ShowOverlayLayerImplementation from "./UI/ShowDataLayer/ShowOverlayLayerImplementation";
|
||||
import {DefaultGuiState} from "./UI/DefaultGuiState";
|
||||
import {QueryParameters} from "./Logic/Web/QueryParameters";
|
||||
|
||||
|
||||
const layout = QueryParameters.GetQueryParameter("layout", undefined).data ?? ""
|
||||
const customLayout = QueryParameters.GetQueryParameter("userlayout", undefined).data ?? ""
|
||||
const l = window.location;
|
||||
if( layout !== ""){
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
// Miscelleanous
|
||||
Utils.DisableLongPresses()
|
||||
document.getElementById("decoration-desktop").remove();
|
||||
new AllThemesGui();
|
Loading…
Add table
Add a link
Reference in a new issue