style/note attachments: make the list scrollable again

This commit is contained in:
Adorian Doran 2025-12-25 05:05:03 +02:00
parent 62263e3eea
commit fe38689a26

View File

@ -34,20 +34,23 @@ import FNote from "../../entities/fnote";
export function AttachmentList({ note }: TypeWidgetProps) {
const attachments = useAttachments(note);
// TODO: Extract inline styles to CSS
return (
<>
<div style={{display: "flex", flexDirection: "column", height: "100%"}}>
<AttachmentListHeader noteId={note.noteId} />
<div style={{overflow: "auto", flexGrow: 1}}>
<div className="attachment-list-wrapper">
{attachments.length ? (
attachments.map(attachment => <AttachmentInfo key={attachment.attachmentId} attachment={attachment} />)
) : (
<Alert type="info">
{t("attachment_list.no_attachments")}
</Alert>
)}
<div className="attachment-list-wrapper">
{attachments.length ? (
attachments.map(attachment => <AttachmentInfo key={attachment.attachmentId} attachment={attachment} />)
) : (
<Alert type="info">
{t("attachment_list.no_attachments")}
</Alert>
)}
</div>
</div>
</>
</div>
);
}