~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

A commit list names who wrote each commit, not the runner that landed it

Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:web/commit-byline
web/src/lib/molecules/Committed.svelte+4−5
@@ -7,8 +7,8 @@
* Who wrote a commit and when it was committed, as `alice committed 2
* 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 on
* a phone cuts to who wrote it and when it was committed. Without times
* `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.
*/
let { commit: c, bare = false, mute = false }: { commit: CommitView; bare?: boolean; mute?: boolean } = $props();
@@ -20,6 +20,5 @@
{#snippet who(a: CommitAuthorView)}{#if a.actor}<a href="/{urlPath(a.actor.handle)}"><b>{a.name}</b></a>{:else}<b>{a.name}</b>{/if}{/snippet}
<CommitAuthor commit={c} />
{#if earlier}<span class="committed-long" class:mute>{'authored '}<Time at={c.date} show={on} /></span>{:else if by}<span class="committed-long" class:mute>authored</span>{/if}
{#if by}<span class="committed-long" class:mute>{'and '}{@render who(by)}{bare ? ' committed' : ' committed '}{#if !bare}<Time at={whenCommitted(c)} show={on} />{/if}</span>{:else if bare}<span class:mute>committed</span>{:else}<span class:committed-long={earlier} class:mute>{earlier ? 'and committed ' : 'committed '}<Time at={whenCommitted(c)} show={on} /></span>{/if}
{#if !bare && (earlier || by)}<span class="committed-short" class:mute><Time at={whenCommitted(c)} show={on} /></span>{/if}
{#snippet when(t: string)}<Time at={t} show={on} />{/snippet}
<span class="committed" class:mute>{#if earlier || by}<span class="committed-long">{#if earlier}{'authored '}{@render when(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>
web/src/app.css+5−4
@@ -144,8 +144,12 @@ a.row:hover{background:var(--hover)}
.section{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);margin:0 0 var(--space-4)}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2-5) var(--space-4);margin:0 0 var(--space-4)}
/* A command to copy. */
.committed-short{display:none}
/* A commit in a list by who wrote it and when it was committed: who committed it, and when it was written, are on its page. */
.list .meta .committed-long{display:none}
.list .meta .committed-short{display:inline}
/* A command to copy. */
.cmd{display:flex;align-items:flex-start;gap:var(--space-2);border:var(--border);border-radius:var(--radius-md);background:var(--bg);padding:var(--space-2) var(--space-2) var(--space-2) var(--space-3)}
.cmd+.cmd{margin-top:var(--space-2)}
.cmd pre{flex:1;min-width:0;margin:0;padding:var(--space-1) 0;white-space:pre-wrap;overflow-wrap:anywhere}
@@ -1274,9 +1278,6 @@ textarea.field{resize:vertical;font-family:var(--font-mono);font-size:var(--text
.box.items .filter a{white-space:nowrap}
.box.items .filter .i{display:none}
.box.items .menus~.end{margin-left:var(--space-3)}
/* A commit in a list by who wrote it and when it was committed, the rest on its page. */
.list .meta .committed-long{display:none}
.list .meta .committed-short{display:inline}
.run-about .end{margin-left:0}
.list .sha,.list .hide-sm,.list li>.hide-sm,.boxhead .filter+.mute{display:none}
.files .name{flex:1}