More Media Gallery fixes

This commit is contained in:
Fedor Indutny
2025-11-20 14:41:48 -08:00
committed by GitHub
parent 9f8c3cd765
commit 025d5d5011
4 changed files with 15 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ export function FileThumbnail(props: PropsType): JSX.Element {
className={tw(
'flex items-center justify-center',
'relative',
'mx-1.5 h-10 w-7.5',
'mx-0.75 h-10 w-7.5',
'bg-contain bg-center bg-no-repeat',
'bg-[url(../images/generic-file.svg)]'
)}

View File

@@ -75,7 +75,7 @@ export function AttachmentSection({
case 'media':
return (
<section className={tw('ps-5')}>
<h2 className={tw('ps-1 pt-4 pb-2 font-semibold')}>{header}</h2>
<h2 className={tw('ps-1 pt-4 pb-2 type-body-medium')}>{header}</h2>
<div className={tw('flex flex-row flex-wrap gap-1 pb-1')}>
{verified.entries.map(mediaItem => {
return (
@@ -94,8 +94,8 @@ export function AttachmentSection({
case 'audio':
case 'link':
return (
<section className={tw('mb-3 border-b-border-primary px-6 pb-3')}>
<h2 className={tw('pt-1.5 pb-2 font-semibold')}>{header}</h2>
<section className={tw('mx-4 mb-3 border-b-border-primary px-2 pb-3')}>
<h2 className={tw('pt-1.5 pb-2 type-body-medium')}>{header}</h2>
<div>
{verified.entries.map(mediaItem => {
return (

View File

@@ -64,7 +64,7 @@ export function LinkPreviewItem({
<div
className={tw(
'flex size-9 items-center justify-center',
'overflow-hidden rounded-sm bg-elevated-background-tertiary'
'overflow-hidden rounded-sm bg-label-secondary'
)}
>
<AxoSymbol.Icon symbol="link" size={20} label={null} />

View File

@@ -168,8 +168,17 @@ function MediaSection({
);
});
const isGrid = mediaItems.at(0)?.type === 'media';
return (
<div className={tw('flex min-w-0 grow flex-col divide-y')}>{sections}</div>
<div
className={tw(
'flex min-w-0 grow flex-col',
isGrid ? undefined : 'divide-y'
)}
>
{sections}
</div>
);
}