diff --git a/src/Logic/ImageProviders/ImageUploadManager.ts b/src/Logic/ImageProviders/ImageUploadManager.ts index a187e82ef..ca0487d9b 100644 --- a/src/Logic/ImageProviders/ImageUploadManager.ts +++ b/src/Logic/ImageProviders/ImageUploadManager.ts @@ -97,7 +97,7 @@ export class ImageUploadManager { console.log("Upload done, creating ") const action = await this.uploadImageWithLicense(featureId, title, description, file) if (!isNaN(Number(featureId))) { - // THis is a map note + // This is a map note const url = action._url await this._osmConnection.addCommentToNote(featureId, url) NoteCommentElement.addCommentTo(url, >tagsStore, { @@ -151,9 +151,13 @@ export class ImageUploadManager { } private increaseCountFor(collection: Map>, key: string | "*") { - const counter = this.getCounterFor(collection, key) - counter.setData(counter.data + 1) - const global = this.getCounterFor(collection, "*") - global.setData(counter.data + 1) + { + const counter = this.getCounterFor(collection, key) + counter.setData(counter.data + 1) + } + { + const global = this.getCounterFor(collection, "*") + global.setData(global.data + 1) + } } } diff --git a/src/UI/Image/UploadingImageCounter.svelte b/src/UI/Image/UploadingImageCounter.svelte index a3e00e2d5..834ebc4db 100644 --- a/src/UI/Image/UploadingImageCounter.svelte +++ b/src/UI/Image/UploadingImageCounter.svelte @@ -1,33 +1,38 @@ -{#if $uploadStarted == 1} - {#if $uploadFinished == 1} - - {:else if $failed == 1} +{#if $uploadStarted === 1} + {#if $uploadFinished === 1} + {#if showThankYou} + + {/if} + {:else if $failed === 1}
- {:else if $retried == 1} + {:else if $retried === 1} @@ -37,9 +42,11 @@ {/if} {:else if $uploadStarted > 1} - {#if $uploadFinished + $failed == $uploadStarted && $uploadFinished > 0} - - {:else if $uploadFinished == 0} + {#if $uploadFinished + $failed === $uploadStarted && $uploadFinished > 0} + {#if showThankYou} + + {/if} + {:else if $uploadFinished === 0} diff --git a/src/UI/ThemeViewGUI.svelte b/src/UI/ThemeViewGUI.svelte index 878b4ee16..5d3ffb24d 100644 --- a/src/UI/ThemeViewGUI.svelte +++ b/src/UI/ThemeViewGUI.svelte @@ -52,6 +52,7 @@ import LanguagePicker from "./LanguagePicker"; import Locale from "./i18n/Locale"; import ShareScreen from "./BigComponents/ShareScreen.svelte"; + import UploadingImageCounter from "./Image/UploadingImageCounter.svelte" export let state: ThemeViewState; let layout = state.layout; @@ -154,6 +155,7 @@ new ExtraLinkButton(state, layout.extraLink).SetClass("pointer-events-auto")} /> +
Testmode