From 81527d33441226d24284d3f74bed98a3c5b5834e Mon Sep 17 00:00:00 2001 From: Thibault Molleman Date: Thu, 12 Nov 2020 09:01:58 +0100 Subject: [PATCH 1/2] Fixed shop.svg Removed 2 zero width no-break spaces that were at the start of the svg, causing it not to display --- assets/themes/shops/shop.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/themes/shops/shop.svg b/assets/themes/shops/shop.svg index 8a2e8d451..b85f3ddeb 100644 --- a/assets/themes/shops/shop.svg +++ b/assets/themes/shops/shop.svg @@ -1,4 +1,4 @@ - + @@ -13,4 +13,4 @@ - \ No newline at end of file + From 52f53eb6b6e63d10c756c97368cc509248ef1dc0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 12 Nov 2020 12:21:34 +0100 Subject: [PATCH 2/2] Disable editing when userbadge is disabled --- State.ts | 2 +- UI/Popup/EditableTagRendering.ts | 3 +++ UI/Popup/FeatureInfoBox.ts | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/State.ts b/State.ts index 19e041a85..d76608ec9 100644 --- a/State.ts +++ b/State.ts @@ -22,7 +22,7 @@ export default class State { // The singleton of the global state public static state: State; - public static vNumber = "0.1.2e"; + public static vNumber = "0.1.2f"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/UI/Popup/EditableTagRendering.ts b/UI/Popup/EditableTagRendering.ts index b26ade95e..931b570b6 100644 --- a/UI/Popup/EditableTagRendering.ts +++ b/UI/Popup/EditableTagRendering.ts @@ -35,11 +35,14 @@ export default class EditableTagRendering extends UIElement { if (this._configuration.question !== undefined) { // 2.3em total width + if(State.state.featureSwitchUserbadge.data){ + this._editButton = Svg.pencil_ui().SetClass("edit-button") .onClick(() => { self._editMode.setData(true); }); + } // And at last, set up the skip button diff --git a/UI/Popup/FeatureInfoBox.ts b/UI/Popup/FeatureInfoBox.ts index c0439c266..abc4b6ce9 100644 --- a/UI/Popup/FeatureInfoBox.ts +++ b/UI/Popup/FeatureInfoBox.ts @@ -5,6 +5,7 @@ import EditableTagRendering from "./EditableTagRendering"; import QuestionBox from "./QuestionBox"; import Combine from "../Base/Combine"; import TagRenderingAnswer from "./TagRenderingAnswer"; +import State from "../../State"; export class FeatureInfoBox extends UIElement { private _tags: UIEventSource; @@ -33,7 +34,9 @@ export class FeatureInfoBox extends UIElement { layerConfig.titleIcons.map(icon => new TagRenderingAnswer(tags, icon))) .SetClass("featureinfobox-icons"); this._renderings = layerConfig.tagRenderings.map(tr => new EditableTagRendering(tags, tr)); - this._questionBox = new QuestionBox(tags, layerConfig.tagRenderings); + if (State.state.featureSwitchUserbadge.data) { + this._questionBox = new QuestionBox(tags, layerConfig.tagRenderings); + } }