Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
Svelte
at icy/tmrrpn
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253<script lang="ts"> import { resolve } from "$app/paths"; import type { ResolvedPathname } from "$app/types"; import User from "$lib/components/ui/User.svelte"; import ProfilePopover from "$lib/components/profile/ProfilePopover.svelte"; import TimeAgo from "$lib/components/ui/TimeAgo.svelte"; import IssueStatePill from "./IssueStatePill.svelte"; import type { IssueSummary } from "$lib/components/repo/types"; import Separator from "$lib/components/ui/Separator.svelte"; import { formatCount } from "$lib/format";
interface Props { ownerHandle: string; repoName: string; issue: IssueSummary; }
let { ownerHandle, repoName, issue }: Props = $props();
// the at-uri is appended after `resolve`, which would drop the empty segment in `at://` const href = $derived( `${resolve(`/${ownerHandle}/${repoName}/issues` as "/")}/${issue.uri}` as ResolvedPathname );</script>
<div class="pb-2"> <a {href} class="text-foreground-default hover:underline"> <span>{issue.title}</span> <span class="text-foreground-muted">#{issue.rkey}</span> </a></div>
<div class="flex flex-wrap items-center gap-x-1 gap-y-1.5 text-foreground-muted"> <IssueStatePill state={issue.state} />
<span class="ml-1 flex items-center gap-1"> <ProfilePopover did={issue.authorDid}> <User handle={issue.authorHandle} did={issue.authorDid} link /> </ProfilePopover> </span>
<Separator variant="dot" />
<TimeAgo value={issue.createdAt} />
<Separator variant="dot" />
<a {href} class="text-foreground-muted no-underline hover:underline"> {formatCount(issue.commentCount)} {issue.commentCount === 1 ? "comment" : "comments"} </a></div>