tweak: add hr between attachments

This commit is contained in:
alvaromartmart 2024-06-24 23:42:36 +02:00
parent e4f773e3ea
commit e27aa15e12
2 changed files with 14 additions and 7 deletions

View file

@ -53,3 +53,7 @@
border-radius: 2px;
padding: 0.5rem;
}
.attachment-item hr {
border: 0.2px solid var(--vscode-panel-border);
}

View file

@ -106,13 +106,16 @@ export const AttachmentsTab: React.FunctionComponent<{
})}
{attachments.size ? <div className='attachments-section'>Attachments</div> : undefined}
{[...attachments.values()].map((a, i) => {
return <div className='attachment-item' key={`attachment-${i}`}>
<a href={attachmentURL(a) + '&download'}>{a.name}</a>
{ isTextualMimeType(a.contentType) ?
<TextAttachment attachment={a} /> :
<div><i>no preview available</i></div>
}
</div>;
return <>
{ i > 0 && <hr /> }
<div className='attachment-item' key={`attachment-${i}`}>
<a href={attachmentURL(a) + '&download'}>{a.name}</a>
{ isTextualMimeType(a.contentType) ?
<TextAttachment attachment={a} /> :
<div><i>no preview available</i></div>
}
</div>
</>;
})}
</div>;
};