chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
A pull's timeline says when each of its commits was committed
web/src/lib/molecules/Committed.svelte+7−13
| @@ -8,16 +8,12 @@ | ||
* hours ago`; and, as a rebase or a squash keeps when it was written, | ||
* when that was another day, or who committed it when someone else did: | ||
* `alice authored on Oct 2 and bob committed on Oct 5`, which a list | ||
* cuts to who wrote it and when it was committed. Without times | ||
* when `bare`; each part `mute` when told. | ||
* cuts to who wrote it and when it was committed. Each part `mute` when | ||
* told. | ||
*/ | ||
let { | ||
commit: c, | ||
bare = false, | ||
mute = false | ||
}: { commit: CommitView; bare?: boolean; mute?: boolean } = $props(); | ||
let { commit: c, mute = false }: { commit: CommitView; mute?: boolean } = $props(); | ||
const by = $derived(c.committer); | ||
const earlier = $derived(!bare && day(c.date) !== day(whenCommitted(c))); | ||
const earlier = $derived(day(c.date) !== day(whenCommitted(c))); | ||
const on = (t: string) => ago(t, 'on '); | ||
</script> | ||
| ||
| @@ -33,9 +29,7 @@ | ||
c.date | ||
)}{:else}authored{/if}{' and '}{#if by}{@render who( | ||
by | ||
)}{' committed'}{:else}committed{/if}{#if !bare}{' '}{@render when( | ||
whenCommitted(c) | ||
)}{/if}</span | ||
>{#if !bare}<span class="committed-short">{'committed '}{@render when(whenCommitted(c))}</span | ||
>{/if}{:else if bare}committed{:else}{'committed '}{@render when(whenCommitted(c))}{/if}</span | ||
)}{' committed'}{:else}committed{/if}{' '}{@render when(whenCommitted(c))}</span | ||
><span class="committed-short">{'committed '}{@render when(whenCommitted(c))}</span | ||
>{:else}{'committed '}{@render when(whenCommitted(c))}{/if}</span | ||
> | ||
web/src/lib/organisms/CommitEvent.svelte+1−1
| @@ -29,7 +29,7 @@ | ||
<li> | ||
<div class="grow"> | ||
<a class="title clip" href="{at}/commit/{c.sha}">{subject(c.message)}</a> | ||
<div class="meta"><Committed commit={c} bare /></div> | ||
<div class="meta"><Committed commit={c} /></div> | ||
</div> | ||
<Sha sha={c.sha} href="{at}/commit/{c.sha}" /> | ||
</li> | ||