mirror of https://github.com/usememos/memos.git
chore: show compact attachment count instead of thumbnails in comment previews
When truncate mode is active (comment list), display an inline file icon with attachment count instead of rendering full image thumbnails.
This commit is contained in:
parent
6a03917f6e
commit
4f6730a12e
|
|
@ -132,9 +132,17 @@ const MemoPreview = ({
|
|||
)}
|
||||
>
|
||||
{showMeta && meta}
|
||||
{showMeta && truncate && hasContent && <div className="text-muted-foreground/50 shrink-0">·</div>}
|
||||
{showMeta && truncate && (hasContent || hasAttachments) && <div className="text-muted-foreground/50 shrink-0">·</div>}
|
||||
{contentNode}
|
||||
{hasAttachments && <AttachmentThumbnails attachments={attachments} />}
|
||||
{hasAttachments &&
|
||||
(truncate ? (
|
||||
<div className="shrink-0 text-muted-foreground/70 inline-flex justify-center items-center gap-0.5">
|
||||
<FileIcon className="w-3 h-3 inline-block" />
|
||||
<span className="text-xs">{attachments.length}</span>
|
||||
</div>
|
||||
) : (
|
||||
<AttachmentThumbnails attachments={attachments} />
|
||||
))}
|
||||
</div>
|
||||
</MemoViewContext.Provider>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue