proper depth

This commit is contained in:
Simon Knott 2024-10-10 11:41:19 +02:00
parent ecb22691a1
commit 9f0965a0b2
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 1 additions and 2 deletions

View file

@ -98,7 +98,6 @@
.attachment-body { .attachment-body {
white-space: pre-wrap; white-space: pre-wrap;
background-color: var(--color-canvas-subtle); background-color: var(--color-canvas-subtle);
margin-left: 24px;
line-height: normal; line-height: normal;
padding: 8px; padding: 8px;
font-family: monospace; font-family: monospace;

View file

@ -87,7 +87,7 @@ export const AttachmentLink: React.FunctionComponent<{
: <span>{linkifyText(attachment.name)}</span> : <span>{linkifyText(attachment.name)}</span>
)} )}
</span>} loadChildren={attachment.body ? () => { </span>} loadChildren={attachment.body ? () => {
return [<div key={1} className='attachment-body'><CopyToClipboard value={attachment.body!}/>{linkifyText(attachment.body!)}</div>]; return [<div key={1} className='attachment-body' style={{ marginLeft: 24 + (depth ?? 0) * 22 + 4 }}><CopyToClipboard value={attachment.body!}/>{linkifyText(attachment.body!)}</div>];
} : undefined} depth={depth ?? 0} style={{ lineHeight: '32px' }}></TreeItem>; } : undefined} depth={depth ?? 0} style={{ lineHeight: '32px' }}></TreeItem>;
}; };