parent
093ccc8e50
commit
4ba33316fd
@ -1,37 +1,29 @@ |
||||
import React, { useEffect, useState } from 'react' |
||||
import { GetDeviceCode } from '../github/devicecode' |
||||
import { GitHubCredentials } from './githubcredentials' |
||||
import { Clone } from './clone' |
||||
import { gitUIPanels } from '../../types' |
||||
import GitUIButton from '../buttons/gituibutton' |
||||
import { FormattedMessage } from 'react-intl' |
||||
|
||||
export const Setup = () => { |
||||
export const Setup = ({ callback }) => { |
||||
|
||||
const [screen, setScreen] = useState(0) |
||||
|
||||
if (screen === 0) { |
||||
return ( |
||||
<> |
||||
<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> |
||||
</> |
||||
) |
||||
const startSetingUp = () => { |
||||
callback(gitUIPanels.GITHUB) |
||||
} |
||||
|
||||
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