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

View File

@ -811,6 +811,27 @@
justify-content:center; justify-content:center;
cursor:pointer; 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{ .create-link-preview{
position:relative; position:relative;
overflow:hidden; overflow:hidden;