johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import { repoHref, urlPath } from '#lib/format.ts';
import BranchMenu from '#lib/molecules/BranchMenu.svelte';
import Crumbs from '#lib/molecules/Crumbs.svelte';
import RefCounts from '#lib/molecules/RefCounts.svelte';
import type { Snippet } from 'svelte';
/** The revision shown, opening to every branch, and every tag when told them, to see the same `view` on; at the top of the code, how many branches and `tags` there are, when told the tags, and below it the way up the path; then, at its end, `end`. */
let {
authority,
name,
rev,
view,
path,
branches,
head,
tags,
end
}: {
authority: string;
name: string;
rev: string;
view: string;
path: string;
branches: string[];
head: string;
tags?: string[];
end?: Snippet;
} = $props();
</script>
<div class="toolbar">
<BranchMenu {authority} {name} {rev} {view} {path} {branches} {head} {tags} />
{#if view === 'tree' && !path && tags}<RefCounts
{authority}
{name}
branches={branches.length}
tags={tags.length}
/>{/if}
{#if path}<Crumbs {name} root={repoHref(authority, name, `/tree/${urlPath(rev)}`)} {path} />{/if}
{#if end}<div class="toolbar-end">{@render end()}</div>{/if}
</div>