forked from MapComplete/MapComplete
UX: show 'no nearby images' if no images are shown, fix #1727
This commit is contained in:
parent
ab5ec29c02
commit
e1ec29651c
2 changed files with 5 additions and 1 deletions
|
@ -419,6 +419,7 @@
|
||||||
"isDeleted": "Deleted",
|
"isDeleted": "Deleted",
|
||||||
"nearby": {
|
"nearby": {
|
||||||
"link": "This picture shows the object",
|
"link": "This picture shows the object",
|
||||||
|
"noNearbyImages": "No nearby images were found",
|
||||||
"seeNearby": "Browse and link nearby pictures",
|
"seeNearby": "Browse and link nearby pictures",
|
||||||
"title": "Nearby streetview imagery"
|
"title": "Nearby streetview imagery"
|
||||||
},
|
},
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
let images: Store<P4CPicture[]> = imagesProvider.store.map((images) => images.slice(0, 20))
|
let images: Store<P4CPicture[]> = imagesProvider.store.map((images) => images.slice(0, 20))
|
||||||
|
let allDone = imagesProvider.allDone
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="interactive border-interactive rounded-2xl p-2">
|
<div class="interactive border-interactive rounded-2xl p-2">
|
||||||
|
@ -44,8 +45,10 @@
|
||||||
</h4>
|
</h4>
|
||||||
<slot name="corner" />
|
<slot name="corner" />
|
||||||
</div>
|
</div>
|
||||||
{#if $images.length === 0}
|
{#if !$allDone}
|
||||||
<Loading />
|
<Loading />
|
||||||
|
{:else if $images.length === 0}
|
||||||
|
<Tr t={Translations.t.image.nearby.noNearbyImages} cls="alert"/>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex w-full space-x-1 overflow-x-auto" style="scroll-snap-type: x proximity">
|
<div class="flex w-full space-x-1 overflow-x-auto" style="scroll-snap-type: x proximity">
|
||||||
{#each $images as image (image.pictureUrl)}
|
{#each $images as image (image.pictureUrl)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue