Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263<script lang="ts"> import { stringRawHref } from "$lib/components/strings/urls"; import type { RepoBlobView } from "$lib/api/blob"; import { compactRelativeTime } from "$lib/format"; import type { StringRecord } from "$lib/api/records"; import BlobView from "$lib/components/repo/BlobView.svelte"; import StringHeader from "$lib/components/strings/StringHeader.svelte";
interface Props { ownerHandle: string; ownerDid: string; rkey: string; string: StringRecord; blob: RepoBlobView; isOwner?: boolean; uri: string; starCount: number | Promise<number>; viewerStarRkey: string | null | Promise<string | null>; onedit?: () => void; ondelete?: () => void; deleting?: boolean; }
let { ownerHandle, ownerDid, rkey, string, blob, isOwner = false, uri, starCount, viewerStarRkey, onedit, ondelete, deleting = false }: Props = $props();
const rawHref = $derived(stringRawHref(ownerHandle, rkey)); const timeLabel = $derived(`Created ${compactRelativeTime(string.createdAt)}`);</script>
<div class="flex flex-col gap-6"> <div class="px-4"> <StringHeader {ownerHandle} {ownerDid} {rkey} filename={blob.path} description={string.description} {isOwner} stringUri={uri} initialStarCount={starCount} initialStarRkey={viewerStarRkey} {onedit} {ondelete} {deleting} /> </div>
<BlobView {ownerHandle} {blob} {rawHref} {timeLabel} /></div>