add spacing and moved fetch repo button

pull/5000/head
Joseph Izang 7 months ago committed by Aniket
parent 828b75410d
commit 40fd729ba9
  1. 6
      libs/remix-ui/git/src/components/gitui.tsx
  2. 19
      libs/remix-ui/git/src/components/panels/remotes.tsx
  3. 3
      libs/remix-ui/git/src/components/panels/remotesimport.tsx

@ -200,16 +200,16 @@ export const GitUI = (props: IGitUi) => {
<hr></hr> <hr></hr>
<BranchesNavigation eventKey="2" activePanel={activePanel} callback={setActivePanel} /> <BranchesNavigation eventKey="2" activePanel={activePanel} callback={setActivePanel} />
<Accordion.Collapse className='bg-light' eventKey="2"> <Accordion.Collapse className='bg-light' eventKey="2">
<div className="px-3"> <div className="px-2">
<Branches /> <Branches />
</div> </div>
</Accordion.Collapse> </Accordion.Collapse>
<hr></hr> <hr></hr>
<RemotesNavigation eventKey="5" activePanel={activePanel} callback={setActivePanel} /> <RemotesNavigation eventKey="5" activePanel={activePanel} callback={setActivePanel} />
<Accordion.Collapse className='bg-light' eventKey="5"> <Accordion.Collapse className='bg-light' eventKey="5">
<> <div className="px-2">
<Remotes plugin={plugin}></Remotes> <Remotes plugin={plugin}></Remotes>
</> </div>
</Accordion.Collapse> </Accordion.Collapse>
<hr></hr> <hr></hr>
<CloneNavigation eventKey="4" activePanel={activePanel} callback={setActivePanel} /> <CloneNavigation eventKey="4" activePanel={activePanel} callback={setActivePanel} />

@ -30,9 +30,11 @@ export const Remotes = (props: RemotesProps) => {
return ( return (
<> <>
<div data-id="remotes-panel-content"> <div data-id="remotes-panel-content" className="d-flex flex-column">
<RemotesImport plugin={props.plugin} />
<hr className="mt-0 border border-2" />
{context.remotes && context.remotes.length ? {context.remotes && context.remotes.length ?
<> <div>
{context.remotes && context.remotes.map((remote, index) => { {context.remotes && context.remotes.map((remote, index) => {
@ -40,18 +42,17 @@ export const Remotes = (props: RemotesProps) => {
<Remoteselect key={index} remote={remote}></Remoteselect> <Remoteselect key={index} remote={remote}></Remoteselect>
); );
})} })}
</> : <>No remotes</>} </div> : <div>
<hr></hr> <label className="text-uppercase">No remotes</label>
</div>}
<input placeholder="remote name" name='remotename' onChange={e => onRemoteNameChange(e.target.value)} value={remoteName} className="form-control mb-2" type="text" id="remotename" /> <input placeholder="remote name" name='remotename' onChange={e => onRemoteNameChange(e.target.value)} value={remoteName} className="form-control mb-3" type="text" id="remotename" />
<input placeholder="remote url" name='remoteurl' onChange={e => onUrlChange(e.target.value)} value={url} className="form-control" type="text" id="remoteurl" /> <input placeholder="remote url" name='remoteurl' onChange={e => onUrlChange(e.target.value)} value={url} className="form-control mb-3" type="text" id="remoteurl" />
<button disabled={(remoteName && url) ? false : true} className='btn btn-primary mt-1 w-100' onClick={async () => { <button disabled={(remoteName && url) ? false : true} className='btn btn-primary mt-1 w-100' onClick={async () => {
addRemote(); addRemote();
}}>add remote</button> }}>add remote</button>
<hr /> <hr className="mt-0 border border-2" />
<RemotesImport plugin={props.plugin} />
<hr />
</div> </div>
</>) </>)
} }

@ -68,9 +68,8 @@ export const RemotesImport = (props: RemotesImportProps) => {
return ( return (
<> <>
<TokenWarning plugin={props.plugin} />
<RepositorySelect select={selectRepo} /> <RepositorySelect select={selectRepo} />
<TokenWarning plugin={props.plugin} />
{repo ? {repo ?
<input data-id='remote-panel-remotename' placeholder="remote name" name='remotename' onChange={e => onRemoteNameChange(e.target.value)} value={remoteName} className="form-control mb-2" type="text" id="remotename" /> <input data-id='remote-panel-remotename' placeholder="remote name" name='remotename' onChange={e => onRemoteNameChange(e.target.value)} value={remoteName} className="form-control mb-2" type="text" id="remotename" />
: null} : null}

Loading…
Cancel
Save