tweak: add hr between attachments
This commit is contained in:
parent
e4f773e3ea
commit
e27aa15e12
|
|
@ -53,3 +53,7 @@
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attachment-item hr {
|
||||||
|
border: 0.2px solid var(--vscode-panel-border);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,13 +106,16 @@ export const AttachmentsTab: React.FunctionComponent<{
|
||||||
})}
|
})}
|
||||||
{attachments.size ? <div className='attachments-section'>Attachments</div> : undefined}
|
{attachments.size ? <div className='attachments-section'>Attachments</div> : undefined}
|
||||||
{[...attachments.values()].map((a, i) => {
|
{[...attachments.values()].map((a, i) => {
|
||||||
return <div className='attachment-item' key={`attachment-${i}`}>
|
return <>
|
||||||
<a href={attachmentURL(a) + '&download'}>{a.name}</a>
|
{ i > 0 && <hr /> }
|
||||||
{ isTextualMimeType(a.contentType) ?
|
<div className='attachment-item' key={`attachment-${i}`}>
|
||||||
<TextAttachment attachment={a} /> :
|
<a href={attachmentURL(a) + '&download'}>{a.name}</a>
|
||||||
<div><i>no preview available</i></div>
|
{ isTextualMimeType(a.contentType) ?
|
||||||
}
|
<TextAttachment attachment={a} /> :
|
||||||
</div>;
|
<div><i>no preview available</i></div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</>;
|
||||||
})}
|
})}
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue