mirror of
https://github.com/desktop/desktop
synced 2024-10-02 14:23:59 +00:00
Don't ask for username when provided in URL
This commit is contained in:
parent
eb85e8555c
commit
08ed51edd8
|
@ -66,6 +66,7 @@ class TrampolineUIHelper {
|
|||
this.dispatcher.showPopup({
|
||||
type: PopupType.GenericGitAuthentication,
|
||||
remoteUrl,
|
||||
username,
|
||||
onSubmit: (username: string, password: string) =>
|
||||
resolve({ username, password }),
|
||||
onDismiss: () => resolve({ username: '', password: '' }),
|
||||
|
|
|
@ -171,7 +171,8 @@ export type PopupDetail =
|
|||
| { type: PopupType.CLIInstalled }
|
||||
| {
|
||||
type: PopupType.GenericGitAuthentication
|
||||
hostname: string
|
||||
remoteUrl: string
|
||||
username?: string
|
||||
onSubmit: (username: string, password: string) => void
|
||||
onDismiss: () => void
|
||||
}
|
||||
|
|
|
@ -1926,6 +1926,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
<GenericGitAuthentication
|
||||
key="generic-git-authentication"
|
||||
remoteUrl={popup.remoteUrl}
|
||||
username={popup.username}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onDismiss={onDismiss}
|
||||
onSave={popup.onSubmit}
|
||||
|
|
|
@ -54,9 +54,13 @@ export class GenericGitAuthentication extends React.Component<
|
|||
<p>
|
||||
We were unable to authenticate with{' '}
|
||||
<Ref>{this.props.remoteUrl}</Ref>. Please enter{' '}
|
||||
{this.props.username
|
||||
? `the password for the user ${this.props.username}`
|
||||
: 'your username and password'}{' '}
|
||||
{this.props.username ? (
|
||||
<>
|
||||
the password for the user <Ref>{this.props.username}</Ref>
|
||||
</>
|
||||
) : (
|
||||
'your username and password'
|
||||
)}{' '}
|
||||
to try again.
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue