From 9675cb0eb4bbfa799ae49ca3b6defe1d99fd1a45 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 21 Apr 2021 18:27:15 +0200 Subject: [PATCH] Quickfix: hide bicycle shops on bike_shops query parameter (which got changed due to renames) --- Models/Constants.ts | 2 +- index.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Models/Constants.ts b/Models/Constants.ts index 2119841..ababae8 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.6.8a"; + public static vNumber = "0.6.8b"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/index.ts b/index.ts index e538334..8362f05 100644 --- a/index.ts +++ b/index.ts @@ -67,6 +67,20 @@ defaultLayout = QueryParameters.GetQueryParameter("layout", defaultLayout, "The let layoutToUse: LayoutConfig = AllKnownLayouts.allKnownLayouts.get(defaultLayout.toLowerCase()); +// WOrkaround/legacy +if(layoutToUse.id === "cyclofix"){ + QueryParameters.GetQueryParameter("layer-bike_shops", "true", "Legacy - keep De Fietsambassade working").syncWith( + QueryParameters.GetQueryParameter("layer-bike_shop","true","Legacy - keep De Fietsambassade working") + ) + const bikeShops = QueryParameters.GetQueryParameter("layer-bike_cafes", "true", "Legacy - keep De Fietsambassade working").syncWith( + QueryParameters.GetQueryParameter("layer-bike_cafe","true","Legacy - keep De Fietsambassade working") + ) + if(!bikeShops.data){ + QueryParameters.GetQueryParameter("layer-bike_themed_object", "Legacy - hide bike themed object").setData("false") + } +} + + const userLayoutParam = QueryParameters.GetQueryParameter("userlayout", "false"); const layoutFromBase64 = decodeURIComponent(userLayoutParam.data); document.getElementById('centermessage').innerText = '';