diff --git a/packages/web/src/components/chat/AttachmentRenderer.tsx b/packages/web/src/components/chat/AttachmentRenderer.tsx index 6741741e..849225a6 100644 --- a/packages/web/src/components/chat/AttachmentRenderer.tsx +++ b/packages/web/src/components/chat/AttachmentRenderer.tsx @@ -64,21 +64,7 @@ export function AttachmentRenderer({ attachment }: AttachmentRendererProps) { return null; })(); - // Overlay badge for media (images/video) — absolute positioned inside overflow-hidden container - const federationOverlayBadge = federationTooltip ? ( - -
- - {federationTooltip.type === 'remote' - ? - : <> - } - -
-
- ) : null; - - // Inline badge for file cards (audio/generic) — sits inside the card layout, not absolute + // Inline badge — sits next to file size or below media, never absolute-positioned const federationInlineBadge = federationTooltip ? (
@@ -95,18 +81,20 @@ export function AttachmentRenderer({ attachment }: AttachmentRendererProps) { if (mimetype.startsWith('image/')) { const { width, height } = attachment; return ( -
- {originalName} openImagePreview(attUrl)} - loading="lazy" - /> - {federationOverlayBadge} +
+
+ {originalName} openImagePreview(attUrl)} + loading="lazy" + /> +
+ {federationInlineBadge &&
{federationInlineBadge}
}
); } @@ -115,20 +103,22 @@ export function AttachmentRenderer({ attachment }: AttachmentRendererProps) { const { width, height } = attachment; const hasDimensions = width && height; return ( -
-
); }