From 1b02c240b105fedc9f3a6797837060c5067d0f68 Mon Sep 17 00:00:00 2001 From: Mattias Granlund Date: Thu, 4 Jan 2024 18:22:21 +0100 Subject: [PATCH] Show deleted instead of pending if branch has integrated commit(s) --- .../components/BranchHeader.svelte | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/gitbutler-ui/src/routes/[projectId]/components/BranchHeader.svelte b/gitbutler-ui/src/routes/[projectId]/components/BranchHeader.svelte index 5a8a85610..8ad3b9bf2 100644 --- a/gitbutler-ui/src/routes/[projectId]/components/BranchHeader.svelte +++ b/gitbutler-ui/src/routes/[projectId]/components/BranchHeader.svelte @@ -19,6 +19,8 @@ function handleBranchNameChange() { branchController.updateBranchName(branch.id, branch.name); } + + $: hasIntegratedCommits = branch.commits?.some((b) => b.isIntegrated);
@@ -48,7 +50,13 @@ {#if branch.upstreamName}
- {#if !branch.upstream}
pending
{/if} + {#if !branch.upstream} + {#if hasIntegratedCommits} +
deleted
+ {:else} +
pending
+ {/if} + {/if}
origin/{branch.upstreamName}
@@ -106,10 +114,16 @@ align-items: center; } - .pending { - color: var(--clr-theme-scale-ntrl-40); - background: var(--clr-theme-container-sub); + .status-tag { padding: var(--space-2) var(--space-4); border-radius: var(--radius-s); } + .pending { + color: var(--clr-theme-scale-ntrl-40); + background: var(--clr-theme-container-sub); + } + .deleted { + color: var(--clr-theme-scale-warn-30); + background: var(--clr-theme-warn-container-dim); + }