Show gallery row under preview

This commit is contained in:
Your Name 2026-01-02 12:46:30 -05:00
parent 8d3a1a7e41
commit ff275cd47d
2 changed files with 44 additions and 25 deletions

View File

@ -1453,6 +1453,9 @@ export default function MapView({
draftImageMedium ||
draftImageSmall ||
draftImage;
const galleryItems = draftMediaUrls.filter(
(url) => url && url !== LINK_PREVIEW_PLACEHOLDER
);
const isLinkMode = contentMode === "link";
return (
@ -1715,19 +1718,14 @@ export default function MapView({
<span>{formatPreviewDate(draftPublishedAt)}</span>
) : null}
</div>
{draftMediaUrls.length > 1 && (
<div className="create-gallery-items create-gallery-overlay">
{draftMediaUrls.slice(1).map((url, idx) => (
<figure key={`${url}-${idx}`} className="create-gallery-item">
<img src={url} alt={`Selected image ${idx + 2}`} />
<button
type="button"
className="create-gallery-remove"
onClick={() => removeMediaUrlAtIndex(idx + 1)}
aria-label="Remove image"
{galleryItems.length > 1 && (
<div className="create-gallery-row">
{galleryItems.map((url, idx) => (
<figure
key={`${url}-${idx}`}
className="create-gallery-item create-gallery-static"
>
×
</button>
<img src={url} alt={`Selected image ${idx + 1}`} />
</figure>
))}
</div>

View File

@ -811,6 +811,27 @@
justify-content:center;
cursor:pointer;
}
.create-gallery-row{
display:flex;
gap:.35rem;
margin-top:.6rem;
overflow-x:auto;
padding-bottom:.25rem;
}
.create-gallery-static{
width:48px;
height:48px;
border-radius:12px;
border:1px solid rgba(255,255,255,0.3);
overflow:hidden;
flex:0 0 auto;
}
.create-gallery-static img{
width:100%;
height:100%;
object-fit:cover;
display:block;
}
.create-link-preview{
position:relative;
overflow:hidden;