Merge pull request #4832 from gitbutlerapp/fix-create-pr-button

fix: Disable the PR button if there is no GitHub integration
This commit is contained in:
Esteban Vega 2024-09-06 11:14:05 +02:00 committed by GitHub
commit 710308b4ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,8 +241,10 @@
{#if !$pr} {#if !$pr}
<PullRequestButton <PullRequestButton
click={async ({ draft }) => await createPr({ draft })} click={async ({ draft }) => await createPr({ draft })}
disabled={branch.commits.length === 0 || !$gitHost} disabled={branch.commits.length === 0 || !$gitHost || !$prService}
tooltip={!$gitHost ? 'You can enable git host integration in the settings' : ''} tooltip={!$gitHost || !$prService
? 'You can enable git host integration in the settings'
: ''}
loading={isLoading} loading={isLoading}
/> />
{/if} {/if}