Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
Svelte
123456789101112131415161718192021222324252627282930313233343536373839404142<script lang="ts"> import { resolve } from "$app/paths"; import Avatar from "$lib/components/ui/Avatar.svelte"; import TimeAgo from "$lib/components/ui/TimeAgo.svelte"; import Separator from "$lib/components/ui/Separator.svelte"; import type { CommitSummary } from "$lib/components/repo/types";
interface Props { ownerHandle: string; repoName: string; commit: CommitSummary; }
let { ownerHandle, repoName, commit }: Props = $props();
const href = $derived(resolve(`/${ownerHandle}/${repoName}/commit/${commit.hash}` as "/"));</script>
<div class="mb-sm hidden flex-wrap items-center justify-between gap-xs typography-paragraph-small md:flex"> <div class="flex min-w-0 flex-wrap items-center gap-xs"> {#if commit.authorName} <!-- no email→did mapping yet, always the placeholder --> <Avatar size="regular" /> <span class="truncate text-foreground-default">{commit.authorName}</span> <Separator variant="dot" class="text-foreground-subtle!" /> {/if} <a {href} class="min-w-0 truncate text-foreground-default no-underline hover:underline"> {commit.subject} </a> {#if commit.when} <Separator variant="dot" class="text-foreground-subtle!" /> <span class="text-foreground-muted"><TimeAgo value={commit.when} /></span> {/if} </div> <a {href} class="typography-monospace-small text-foreground-muted no-underline hover:underline"> {commit.shortHash} </a></div><Separator class="my-md" />