diff --git a/UI/Image/ImageUploadFlow.ts b/UI/Image/ImageUploadFlow.ts index 4806eef5e0..c0407c2089 100644 --- a/UI/Image/ImageUploadFlow.ts +++ b/UI/Image/ImageUploadFlow.ts @@ -16,8 +16,16 @@ import {VariableUiElement} from "../Base/VariableUIElement"; export class ImageUploadFlow extends Toggle { + + private static readonly uploadCountsPerId = new Map>() + constructor(tagsSource: UIEventSource, imagePrefix: string = "image", text: string = undefined) { - const uploadedCount = new UIEventSource(0) + const perId = ImageUploadFlow.uploadCountsPerId + const id = tagsSource.data.id + if(!perId.has(id)){ + perId.set(id, new UIEventSource(0)) + } + const uploadedCount = perId.get(id) const uploader = new ImgurUploader(url => { // A file was uploaded - we add it to the tags of the object @@ -125,7 +133,10 @@ export class ImageUploadFlow extends Toggle { if(l == 0){ return undefined; } - return t.uploadDone.Clone().SetClass("thanks"); + if(l == 1){ + return t.uploadDone.Clone().SetClass("thanks"); + } + return t.uploadMultipleDone.Subs({count: l}).SetClass("thanks") })), fileSelector, diff --git a/assets/themes/cyclestreets/cyclestreets.json b/assets/themes/cyclestreets/cyclestreets.json index 23343c762c..9f332e1576 100644 --- a/assets/themes/cyclestreets/cyclestreets.json +++ b/assets/themes/cyclestreets/cyclestreets.json @@ -207,7 +207,8 @@ "overrideAll": { "allowSplit": true, "tagRenderings+": [ - {"id": "is_cyclestreet", + { + "id": "is_cyclestreet", "question": { "nl": "Is deze straat een fietsstraat?", "en": "Is this street a cyclestreet?", @@ -283,7 +284,8 @@ } ] }, - {"id": "future_cyclestreet", + { + "id": "future_cyclestreet", "question": { "nl": "Wanneer wordt deze straat een fietsstraat?", "en": "When will this street become a cyclestreet?",