Skip to content

Commit

Permalink
Show local commit shas
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb-T-Owens committed Jun 10, 2024
1 parent d9beea9 commit 61ede7a
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions app/src/lib/components/CommitCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -186,38 +186,36 @@
<span class="commit__subtitle-divider">•</span>
{/if}

{#if hasCommitUrl}
<button
class="commit__subtitle-btn commit__subtitle-btn_dashed"
on:click|stopPropagation={() => copyToClipboard(commit.id)}
>
<span>{commit.id.substring(0, 7)}</span>

<div class="commit__subtitle-btn__icon">
<Icon name="copy-small" />
</div>
</button>

{#if showDetails && hasCommitUrl}
<span class="commit__subtitle-divider">•</span>

<button
class="commit__subtitle-btn commit__subtitle-btn_dashed"
on:click|stopPropagation={() => copyToClipboard(commit.id)}
class="commit__subtitle-btn"
on:click|stopPropagation={() => {
if (commitUrl) openExternalUrl(commitUrl);
}}
>
<span>{commit.id.substring(0, 7)}</span>
<span>Open</span>

<div class="commit__subtitle-btn__icon">
<Icon name="copy-small" />
<Icon name="open-link" />
</div>
</button>

{#if showDetails}
<span class="commit__subtitle-divider">•</span>

<button
class="commit__subtitle-btn"
on:click|stopPropagation={() => {
if (commitUrl) openExternalUrl(commitUrl);
}}
>
<span>Open</span>

<div class="commit__subtitle-btn__icon">
<Icon name="open-link" />
</div>
</button>
{/if}

<span class="commit__subtitle-divider">•</span>
{/if}

<span class="commit__subtitle-divider">•</span>

<span
>{getTimeAgo(commit.createdAt)}{type === 'remote' || type === 'upstream'
? ` by ${commit.author.name}`
Expand Down

0 comments on commit 61ede7a

Please sign in to comment.