johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import Bars from '#lib/atoms/Bars.svelte';
import Count from '#lib/atoms/Count.svelte';
import Icon from '#lib/atoms/Icon.svelte';
/**
* A pull's two pages, at `href`: what was said and done on it, with how
* many `comments`, and the `files` it changes, with the lines it adds
* and removes in all.
*/
let {
href,
comments,
files,
added,
removed,
current
}: {
href: string;
comments: number;
files: number;
added: number;
removed: number;
current: 'conversation' | 'files';
} = $props();
</script>
<nav class="pull-tabs" aria-label="Pull" data-sveltekit-reset="false">
<a {href} aria-current={current === 'conversation' ? 'page' : undefined}
><Icon name="chat" />Conversation<Count n={comments} /></a
>
<a href="{href}/files" aria-current={current === 'files' ? 'page' : undefined}
><Icon name="file" />Files changed<Count n={files} /></a
>
<span class="stat"
><span class="add">+{added}</span><span class="rem">−{removed}</span><Bars
{added}
{removed}
/></span
>
</nav>