forked from MapComplete/MapComplete
Feature(reviews): support showing images
This commit is contained in:
parent
995427cc66
commit
3ee9ee9d88
2 changed files with 14 additions and 0 deletions
|
|
@ -2196,6 +2196,10 @@ input[type="range"].range-lg::-moz-range-thumb {
|
|||
width: 100vw;
|
||||
}
|
||||
|
||||
.min-w-32 {
|
||||
min-width: 8rem;
|
||||
}
|
||||
|
||||
.min-w-6 {
|
||||
min-width: 1.5rem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
import ThemeViewState from "../../Models/ThemeViewState"
|
||||
import Markdown from "../Base/Markdown.svelte"
|
||||
import AccordionSingle from "../Flowbite/AccordionSingle.svelte"
|
||||
import AttributedImage from "../Image/AttributedImage.svelte"
|
||||
|
||||
export let state: ThemeViewState = undefined
|
||||
export let review: Review & {
|
||||
|
|
@ -86,6 +87,15 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="flex gap-x-2 overflow-x-auto items-center">
|
||||
|
||||
{#each review.images ?? [] as image}
|
||||
<div class="w-32 min-w-32">
|
||||
<AttributedImage image={{url: image.src, id: image.src}}></AttributedImage>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if review.metadata.is_affiliated}
|
||||
<Tr t={Translations.t.reviews.affiliated_reviewer_warning} />
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue