parent
bbaeebd7ac
commit
0bc28c5fed
@ -1,37 +1,29 @@ |
|||||||
import React, { useEffect, useState } from 'react' |
import React, { useEffect, useState } from 'react' |
||||||
import { GetDeviceCode } from '../github/devicecode' |
import { gitUIPanels } from '../../types' |
||||||
import { GitHubCredentials } from './githubcredentials' |
import GitUIButton from '../buttons/gituibutton' |
||||||
import { Clone } from './clone' |
import { FormattedMessage } from 'react-intl' |
||||||
|
|
||||||
export const Setup = () => { |
export const Setup = ({ callback }) => { |
||||||
|
|
||||||
const [screen, setScreen] = useState(0) |
|
||||||
|
|
||||||
if (screen === 0) { |
const startSetingUp = () => { |
||||||
return ( |
callback(gitUIPanels.GITHUB) |
||||||
<> |
|
||||||
<h5>SETUP</h5> |
|
||||||
<div> |
|
||||||
<div className='mt-1 mb-2'> |
|
||||||
To ensure that your commits are properly attributed in Git, you need to configure a username and email address. |
|
||||||
These will be used to identify the author of the commit. |
|
||||||
</div> |
|
||||||
<GetDeviceCode></GetDeviceCode> |
|
||||||
<hr></hr> |
|
||||||
<GitHubCredentials></GitHubCredentials> |
|
||||||
</div> |
|
||||||
</> |
|
||||||
) |
|
||||||
} else if (screen === 1) { |
|
||||||
return ( |
|
||||||
<> |
|
||||||
<h5>SETUP</h5> |
|
||||||
<h6>Step 2</h6> |
|
||||||
<div> |
|
||||||
To ensure that your commits are properly attributed in Git, you need to configure your username and email address. |
|
||||||
<GitHubCredentials></GitHubCredentials> |
|
||||||
</div> |
|
||||||
</> |
|
||||||
) |
|
||||||
} |
} |
||||||
|
|
||||||
|
return ( |
||||||
|
<> |
||||||
|
<h5>SETUP REQUIRED</h5> |
||||||
|
<div> |
||||||
|
<div className='mt-1 mb-2'> |
||||||
|
To ensure that your commits are properly attributed in Git, you need to <a href='#' onClick={startSetingUp} className='cursor-pointer mr-1'>configure a username and email address or connect to GitHub.</a> |
||||||
|
These credentials will be used to identify the author of the commit. |
||||||
|
|
||||||
|
<a href='#' onClick={startSetingUp} className='ml-1 cursor-pointer'> |
||||||
|
<FormattedMessage id='git.setup' /></a> |
||||||
|
</div> |
||||||
|
<hr></hr> |
||||||
|
</div> |
||||||
|
</> |
||||||
|
) |
||||||
|
|
||||||
} |
} |
Loading…
Reference in new issue