terry-staging #16
@@ -9,7 +9,6 @@ import { VideoBubble } from "./bubbles/VideoBubble";
|
|||||||
import { LinkPreviewCard } from "./LinkPreviewCard";
|
import { LinkPreviewCard } from "./LinkPreviewCard";
|
||||||
import { formatDateTime } from "./utils/formatTime";
|
import { formatDateTime } from "./utils/formatTime";
|
||||||
import { FavoriteButton } from "../../favorites/FavoriteButton";
|
import { FavoriteButton } from "../../favorites/FavoriteButton";
|
||||||
import { BubbleAttachmentDownloadButton } from "./BubbleAttachmentDownloadButton";
|
|
||||||
|
|
||||||
export type MessageBubbleVariant = "default" | "latest";
|
export type MessageBubbleVariant = "default" | "latest";
|
||||||
|
|
||||||
@@ -107,12 +106,6 @@ export function MessageBubble({
|
|||||||
onFavoriteChange?.(post.id, favorited)
|
onFavoriteChange?.(post.id, favorited)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{isFileBubble && post.attachments[0] ? (
|
|
||||||
<BubbleAttachmentDownloadButton
|
|
||||||
postId={post.id}
|
|
||||||
attachment={post.attachments[0]}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ import {
|
|||||||
} from "../../SaveToAlbumGuide";
|
} from "../../SaveToAlbumGuide";
|
||||||
import { useToast } from "../../Toast";
|
import { useToast } from "../../Toast";
|
||||||
import { FavoriteButton } from "../../../favorites/FavoriteButton";
|
import { FavoriteButton } from "../../../favorites/FavoriteButton";
|
||||||
|
import { BubbleAttachmentDownloadButton } from "../BubbleAttachmentDownloadButton";
|
||||||
import type { MessageBubbleVariant } from "../MessageBubble";
|
import type { MessageBubbleVariant } from "../MessageBubble";
|
||||||
|
|
||||||
function AttachmentRow({ att }: { postId: string; att: Attachment }) {
|
function AttachmentRow({ postId, att }: { postId: string; att: Attachment }) {
|
||||||
const { Icon, color } = fileIcon({ mime: att.mime, filename: att.filename });
|
const { Icon, color } = fileIcon({ mime: att.mime, filename: att.filename });
|
||||||
const displayFilename = filenameWithExtension(att.filename, att.mime);
|
const displayFilename = filenameWithExtension(att.filename, att.mime);
|
||||||
const [previewFailed, setPreviewFailed] = useState(false);
|
const [previewFailed, setPreviewFailed] = useState(false);
|
||||||
@@ -69,6 +70,7 @@ function AttachmentRow({ att }: { postId: string; att: Attachment }) {
|
|||||||
{formatBytes(att.sizeBytes)}
|
{formatBytes(att.sizeBytes)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<BubbleAttachmentDownloadButton postId={postId} attachment={att} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user