fix: allow copying message stream text

This commit is contained in:
TerryM
2026-05-26 18:03:07 +08:00
parent 625d9fbb42
commit e0629c9df7
8 changed files with 24 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ export function AlbumBubble({ post }: { post: Post }) {
</button>
))}
{text ? (
<div className="whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
<div className="message-stream-copyable-text select-text whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
{autolink(text)}
</div>
) : null}
@@ -80,7 +80,7 @@ export function AlbumBubble({ post }: { post: Post }) {
})}
</div>
{text ? (
<div className="whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
<div className="message-stream-copyable-text select-text whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
{autolink(text)}
</div>
) : null}

View File

@@ -63,7 +63,7 @@ export function FileDocBubble({ post }: { post: Post }) {
<AttachmentRow key={att.id} postId={post.id} att={att} />
))}
{text ? (
<div className="mt-1 whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
<div className="message-stream-copyable-text mt-1 select-text whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
{text}
</div>
) : null}

View File

@@ -31,7 +31,7 @@ export function ImageWithTextBubble({ post }: { post: Post }) {
</button>
{text ? (
<div className="absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/85 via-black/55 to-transparent px-4 pb-4 pt-16 text-[14px] leading-snug text-neutral-100">
<div className="whitespace-pre-wrap break-words">
<div className="message-stream-copyable-text select-text whitespace-pre-wrap break-words">
{autolink(text)}
</div>
</div>

View File

@@ -6,7 +6,7 @@ import { postDisplayText } from "../utils/postText";
export function TextBubble({ post }: { post: Post }) {
const { lang } = useI18n();
return (
<div className="whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
<div className="message-stream-copyable-text select-text whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
{autolink(postDisplayText(post, lang))}
</div>
);

View File

@@ -112,7 +112,7 @@ export function VideoBubble({ post }: { post: Post }) {
)}
</div>
{text ? (
<div className="whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
<div className="message-stream-copyable-text select-text whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
{autolink(text)}
</div>
) : null}