@@ -3,6 +3,7 @@ import { Button, ComboBox, FieldError, Input, Label, ListBox, ListBoxItem, Popov
33
44import { fuzzyMatch } from '~/common/misc' ;
55import { useGitProviderRepositoriesLoaderFetcher } from '~/routes/git-provider.repositories' ;
6+ import type { GitRemoteProviderType } from '~/sync/git/providers/types' ;
67
78import { Icon } from '../icon' ;
89
@@ -11,11 +12,13 @@ export const GitRepositorySelect = ({
1112 onSelect,
1213 credentialsId,
1314 allConnectedRepoURIProjectNameMap,
15+ providerType,
1416} : {
1517 onSelect : ( repoUri : string ) => void ;
1618 uri ?: string ;
1719 credentialsId ?: string ;
1820 allConnectedRepoURIProjectNameMap ?: Record < string , string > | undefined ;
21+ providerType ?: GitRemoteProviderType ;
1922} ) => {
2023 const getGitProviderRepositoriesFetcher = useGitProviderRepositoriesLoaderFetcher ( ) ;
2124 const lastLoadedCredentialsIdRef = useRef < string | undefined > ( ) ;
@@ -86,6 +89,7 @@ export const GitRepositorySelect = ({
8689 < Icon icon = "caret-down" className = "w-5 shrink-0" />
8790 </ Button >
8891 </ div >
92+
8993 { /* There ought to be only on react-aria Button under ComboBox, so we use the original button here */ }
9094 < button
9195 type = "button"
@@ -101,6 +105,18 @@ export const GitRepositorySelect = ({
101105 < Icon icon = "refresh" className = { loading ? 'animate-spin' : '' } />
102106 </ button >
103107 </ div >
108+ { providerType === 'github' && (
109+ < span className = { `flex gap-1 p-2 text-xs ${ loading ? 'opacity-40' : '' } ` } >
110+ < Icon icon = "info-circle" className = "text-(--hl)" />
111+ < span > Can't find a repository?</ span >
112+ < a
113+ className = "flex items-center gap-1 text-(--color-surprise)"
114+ href = "https://github.com/apps/insomnia-desktop/installations/select_target"
115+ >
116+ Configure on GitHub < i className = "fa-solid fa-up-right-from-square" />
117+ </ a >
118+ </ span >
119+ ) }
104120 < Popover
105121 className = "grid w-(--trigger-width) min-w-max grid-flow-col divide-x divide-solid divide-(--hl-md) overflow-y-auto rounded-md border border-solid border-(--hl-sm) bg-(--color-bg) text-sm shadow-lg select-none focus:outline-hidden"
106122 placement = "bottom start"
0 commit comments