Commit 4f6730a1 authored by memoclaw's avatar memoclaw

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.
parent 6a03917f
...@@ -132,9 +132,17 @@ const MemoPreview = ({ ...@@ -132,9 +132,17 @@ const MemoPreview = ({
)} )}
> >
{showMeta && meta} {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} {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> </div>
</MemoViewContext.Provider> </MemoViewContext.Provider>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment