forked from MapComplete/MapComplete
Feature: image upload now uses the indexedDB-backed queue (formerly known as EmergencyBackup), rework (and simplify) counter logic (fix #2186; fix #1942; helps #2022)
This commit is contained in:
parent
55c015ad84
commit
3d3a72a70a
19 changed files with 402 additions and 503 deletions
|
|
@ -61,9 +61,9 @@
|
|||
import Hotkeys from "../Base/Hotkeys"
|
||||
import { ArrowTrendingUp } from "@babeard/svelte-heroicons/solid/ArrowTrendingUp"
|
||||
import ArrowTopRightOnSquare from "@babeard/svelte-heroicons/mini/ArrowTopRightOnSquare"
|
||||
import FailedImagesView from "../Image/FailedImagesView.svelte"
|
||||
import { PhotoIcon } from "@babeard/svelte-heroicons/outline"
|
||||
import EmergencyImageBackup from "../../Logic/ImageProviders/EmergencyImageBackup"
|
||||
import ImageUploadQueue from "../../Logic/ImageProviders/ImageUploadQueue"
|
||||
import QueuedImagesView from "../Image/QueuedImagesView.svelte"
|
||||
|
||||
export let state: {
|
||||
favourites: FavouritesFeatureSource
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
}
|
||||
})
|
||||
let isAndroid = AndroidPolyfill.inAndroid
|
||||
let nrOfFailedImages = EmergencyImageBackup.singleton.failedImages
|
||||
let nrOfFailedImages = ImageUploadQueue.singleton.imagesInQueue
|
||||
let failedImagesOpen = pg.failedImages
|
||||
</script>
|
||||
|
||||
|
|
@ -165,9 +165,9 @@
|
|||
<Page {onlyLink} shown={pg.failedImages} bodyPadding="p-0 pb-4">
|
||||
<svelte:fragment slot="header">
|
||||
<PhotoIcon />
|
||||
<Tr t={Translations.t.failedImages.menu.Subs({count: $nrOfFailedImages.length})} />
|
||||
<Tr t={Translations.t.imageQueue.menu.Subs({count: $nrOfFailedImages.length})} />
|
||||
</svelte:fragment>
|
||||
<FailedImagesView {state} />
|
||||
<QueuedImagesView {state} />
|
||||
</Page>
|
||||
{/if}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue