···
import VideoPlayer from "./video-player";
2
-
import { createSignal, For } from "solid-js";
2
+
import { createSignal, For, Show } from "solid-js";
import { A } from "@solidjs/router";
4
+
import { pds } from "./navbar";
5
+
import Tooltip from "./tooltip";
···
const blob: AtBlob = data as any;
122
-
if (blob.$type === "blob" && blob.mimeType.startsWith("image/")) {
126
-
href={`https://cdn.bsky.app/img/feed_thumbnail/plain/${repo}/${blob.ref.$link}@jpeg`}
131
-
class="max-h-[16rem] max-w-[16rem]"
132
-
src={`https://cdn.bsky.app/img/feed_thumbnail/plain/${repo}/${blob.ref.$link}@jpeg`}
140
-
if (blob.$type === "blob" && blob.mimeType === "video/mp4") {
124
+
if (blob.$type === "blob") {
143
-
<VideoPlayer did={repo} cid={blob.ref.$link} />
127
+
<span class="flex gap-x-1">
128
+
<Show when={blob.mimeType.startsWith("image/")}>
130
+
href={`https://cdn.bsky.app/img/feed_thumbnail/plain/${repo}/${blob.ref.$link}@jpeg`}
135
+
class="max-h-[16rem] max-w-[16rem]"
136
+
src={`https://cdn.bsky.app/img/feed_thumbnail/plain/${repo}/${blob.ref.$link}@jpeg`}
140
+
<Show when={blob.mimeType === "video/mp4"}>
141
+
<VideoPlayer did={repo} cid={blob.ref.$link} />
143
+
<Show when={pds()}>
145
+
href={`https://${pds()}/xrpc/com.atproto.sync.getBlob?did=${repo}&cid=${blob.ref.$link}`}
148
+
<Tooltip text="Blob link">
149
+
<div class="i-tabler-external-link" />