mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-03 15:06:01 +03:00
Show disabled "merged" button when PR merged
This commit is contained in:
parent
28efb148ae
commit
34b10fae7d
@ -233,22 +233,28 @@
|
||||
{#if prStatus?.success}
|
||||
<Button
|
||||
help="Merge pull request and refresh"
|
||||
disabled={isUnapplied}
|
||||
disabled={isUnapplied || !$pr$}
|
||||
loading={isMerging}
|
||||
on:click={async () => {
|
||||
isMerging = true;
|
||||
try {
|
||||
if ($pr$) await githubService.merge($pr$.number);
|
||||
branchService.reloadVirtualBranches();
|
||||
fetchPrStatus();
|
||||
if ($pr$) {
|
||||
await githubService.merge($pr$.number);
|
||||
}
|
||||
} catch {
|
||||
toasts.error('Failed to merge pull request');
|
||||
} finally {
|
||||
isMerging = false;
|
||||
await fetchPrStatus();
|
||||
await branchService.reloadVirtualBranches();
|
||||
}
|
||||
}}
|
||||
>
|
||||
Merge
|
||||
{#if $pr$}
|
||||
Merge
|
||||
{:else}
|
||||
Merged
|
||||
{/if}
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user