diff --git a/Customizations/Layout.ts b/Customizations/Layout.ts index 2062787..e4a6f75 100644 --- a/Customizations/Layout.ts +++ b/Customizations/Layout.ts @@ -31,6 +31,13 @@ export class Layout { public startLat: number; public locationContains: string[]; + + public enableAdd: boolean = true; + public enableUserBadge: boolean = true; + public enableSearch: boolean = true; + public enableLayers: boolean = true; + + public hideFromOverview : boolean = false; /** * diff --git a/Customizations/Layouts/All.ts b/Customizations/Layouts/All.ts index 54065b4..a3e0aeb 100644 --- a/Customizations/Layouts/All.ts +++ b/Customizations/Layouts/All.ts @@ -15,5 +15,6 @@ export class All extends Layout{ "Please log in", "" ); + this.hideFromOverview = true; } } \ No newline at end of file diff --git a/Customizations/Layouts/GRB.ts b/Customizations/Layouts/GRB.ts index 21ba2ab..9efafb9 100644 --- a/Customizations/Layouts/GRB.ts +++ b/Customizations/Layouts/GRB.ts @@ -18,5 +18,6 @@ export class GRB extends Layout { , "", ""); + this.hideFromOverview = true; } } \ No newline at end of file diff --git a/Customizations/Layouts/StreetWidth.ts b/Customizations/Layouts/StreetWidth.ts index 7ad592c..da09971 100644 --- a/Customizations/Layouts/StreetWidth.ts +++ b/Customizations/Layouts/StreetWidth.ts @@ -87,6 +87,10 @@ export class StreetWidth extends Layout{ "
  • Voorzie in elke straat enkele parkeerplaatsen voor kortparkeren. Zo kunnen leveringen, iemand afzetten,... gebeuren zonder dat er een fietspad of een straat geblokkeerd wordt
  • " + ""); this.icon = "assets/bug.svg"; + this.enableSearch = false; + this.enableUserBadge = false; + this.enableAdd = false; + this.hideFromOverview = true; } } \ No newline at end of file diff --git a/InitUiElements.ts b/InitUiElements.ts index e878540..7d20c4c 100644 --- a/InitUiElements.ts +++ b/InitUiElements.ts @@ -69,6 +69,7 @@ export class InitUiElements { new FixedUiElement(`
    help
    `).onClick(() => { fullScreenMessage.setData(fullOptions2) }).AttachTo("help-button-mobile"); + } diff --git a/UI/MoreScreen.ts b/UI/MoreScreen.ts index fab85f8..81d6ad0 100644 --- a/UI/MoreScreen.ts +++ b/UI/MoreScreen.ts @@ -22,10 +22,8 @@ export class MoreScreen extends UIElement { const els: UIElement[] = [] for (const k in AllKnownLayouts.allSets) { - if (k === "all") { - continue; - } const layout = AllKnownLayouts.allSets[k] + if(layout.hideFromOverview){continue} const linkText = `https://pietervdvn.github.io/MapComplete/${layout.name}.html?z=${this.currentLocation.data.zoom}&lat=${this.currentLocation.data.lat}&lon=${this.currentLocation.data.lon} diff --git a/index.ts b/index.ts index fdd57fc..ac9fc58 100644 --- a/index.ts +++ b/index.ts @@ -112,12 +112,11 @@ const lat = QueryParameters.GetQueryParameter("lat", "" + layoutToUse.startLat) const lon = QueryParameters.GetQueryParameter("lon", "" + layoutToUse.startLon) .syncWith(LocalStorageSource.Get("lon")); -const featureSwitchUserbadge = QueryParameters.GetQueryParameter("fs-userbadge", "true"); -const featureSwitchSearch = QueryParameters.GetQueryParameter("fs-search", "true"); +const featureSwitchUserbadge = QueryParameters.GetQueryParameter("fs-userbadge", ""+layoutToUse.enableUserBadge); +const featureSwitchSearch = QueryParameters.GetQueryParameter("fs-search", ""+layoutToUse.enableSearch); const featureSwitchWelcomeMessage = QueryParameters.GetQueryParameter("fs-welcome-message", "true"); -const featureSwitchLayers = QueryParameters.GetQueryParameter("fs-layers", "true"); -const featureSwitchEmbedded = QueryParameters.GetQueryParameter("fs-embedded", "true"); -const featureSwitchAddNew = QueryParameters.GetQueryParameter("fs-add-new", "true"); +const featureSwitchLayers = QueryParameters.GetQueryParameter("fs-layers", ""+layoutToUse.enableLayers); +const featureSwitchAddNew = QueryParameters.GetQueryParameter("fs-add-new", ""+layoutToUse.enableAdd); const featureSwitchIframe = QueryParameters.GetQueryParameter("fs-iframe", "false");