feat(settings): surface GitHub connection needs_reauth/revoked
This commit is contained in:
@@ -48,6 +48,36 @@ export const GithubIntegrationPanel = () => {
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className='space-y-4'>
|
||||
{connection && connection.status !== 'active' ? (
|
||||
<div
|
||||
className={
|
||||
connection.status === 'revoked'
|
||||
? 'rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-600'
|
||||
: 'rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-600'
|
||||
}
|
||||
>
|
||||
<p className='font-medium'>
|
||||
{connection.status === 'revoked'
|
||||
? 'GitHub App installation removed'
|
||||
: 'GitHub access needs re-authorization'}
|
||||
</p>
|
||||
<p className='mt-1'>
|
||||
{connection.status === 'revoked'
|
||||
? 'Reinstall the app to resume syncing.'
|
||||
: 'Reconnect the app to resume syncing.'}
|
||||
</p>
|
||||
{installUrl ? (
|
||||
<a
|
||||
className='mt-2 inline-block underline'
|
||||
href={installUrl}
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Reconnect GitHub App
|
||||
</a>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
{connection ? (
|
||||
<div className='grid gap-2 text-sm'>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user