Skip to content

Commit

Permalink
Merge pull request gitbutlerapp#4052 from gitbutlerapp/Fix-key-for-on…
Browse files Browse the repository at this point in the history
…ly-deletions

Fix key for only deletions
  • Loading branch information
Caleb-T-Owens committed Jun 10, 2024
2 parents 0c481fe + 61ede7a commit 5868899
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 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
4 changes: 3 additions & 1 deletion app/src/lib/components/HunkLines.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
return tokens;
}
$: console.log(lines);
$: isSelected = selectable && selected;
</script>

Expand All @@ -47,7 +49,7 @@
? 'default'
: 'grab'}"
>
{#each lines as line (`${line.afterLineNumber}_${line.content}`)}
{#each lines as line}
<div
class="code-line"
role="group"
Expand Down

0 comments on commit 5868899

Please sign in to comment.