mirror of
https://github.com/zadam/trilium.git
synced 2025-12-29 18:54:29 +01:00
style/note attachments: make the list scrollable again
This commit is contained in:
parent
62263e3eea
commit
fe38689a26
@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user