|
|
@ -8,7 +8,12 @@ import { SelectAndCloneRepositories } from "../github/selectandclonerepositories |
|
|
|
import { RemixUiCheckbox } from "@remix-ui/checkbox" |
|
|
|
import { RemixUiCheckbox } from "@remix-ui/checkbox" |
|
|
|
import GitUIButton from "../buttons/gituibutton" |
|
|
|
import GitUIButton from "../buttons/gituibutton" |
|
|
|
|
|
|
|
|
|
|
|
export const Clone = () => { |
|
|
|
interface CloneProps { |
|
|
|
|
|
|
|
hideLoadFromGitHub?: boolean |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const Clone = (props: CloneProps) => { |
|
|
|
|
|
|
|
const { hideLoadFromGitHub } = props |
|
|
|
const context = React.useContext(gitPluginContext) |
|
|
|
const context = React.useContext(gitPluginContext) |
|
|
|
const actions = React.useContext(gitActionsContext) |
|
|
|
const actions = React.useContext(gitActionsContext) |
|
|
|
const [cloneUrl, setCloneUrl] = useLocalStorage( |
|
|
|
const [cloneUrl, setCloneUrl] = useLocalStorage( |
|
|
@ -64,9 +69,10 @@ export const Clone = () => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<div data-id="clone-panel-content"> |
|
|
|
<div data-id="clone-panel-content"> |
|
|
|
|
|
|
|
{!hideLoadFromGitHub ? <> |
|
|
|
<label className="text-uppercase">Clone from GitHub</label> |
|
|
|
<label className="text-uppercase">Clone from GitHub</label> |
|
|
|
<SelectAndCloneRepositories cloneAllBranches={cloneAllBranches} cloneDepth={cloneDepth} /> |
|
|
|
<SelectAndCloneRepositories cloneAllBranches={cloneAllBranches} cloneDepth={cloneDepth} /> |
|
|
|
<hr /> |
|
|
|
<hr /></> : null} |
|
|
|
<label className="text-uppercase">Clone from URL</label> |
|
|
|
<label className="text-uppercase">Clone from URL</label> |
|
|
|
<InputGroup className="mb-2"> |
|
|
|
<InputGroup className="mb-2"> |
|
|
|
<FormControl data-id="clone-url" id="cloneulr" placeholder="url" name='cloneurl' value={cloneUrl} onChange={e => onGitHubCloneUrlChange(e.target.value)} aria-describedby="urlprepend" /> |
|
|
|
<FormControl data-id="clone-url" id="cloneulr" placeholder="url" name='cloneurl' value={cloneUrl} onChange={e => onGitHubCloneUrlChange(e.target.value)} aria-describedby="urlprepend" /> |
|
|
|