reverting based on comments from @bunsenstraat

pull/5000/head
Joseph Izang 4 months ago committed by Aniket
parent d631239814
commit e59b7a8b3d
  1. 2
      libs/remix-ui/git/src/components/gitui.tsx
  2. 4
      libs/remix-ui/git/src/components/navigation/branches.tsx
  3. 4
      libs/remix-ui/git/src/components/navigation/clone.tsx
  4. 4
      libs/remix-ui/git/src/components/navigation/commands.tsx
  5. 4
      libs/remix-ui/git/src/components/navigation/commits.tsx
  6. 4
      libs/remix-ui/git/src/components/navigation/github.tsx
  7. 4
      libs/remix-ui/git/src/components/navigation/log.tsx
  8. 4
      libs/remix-ui/git/src/components/navigation/remotes.tsx
  9. 4
      libs/remix-ui/git/src/components/navigation/settings.tsx
  10. 4
      libs/remix-ui/git/src/components/navigation/sourcecontrol.tsx
  11. 4
      libs/remix-ui/git/src/components/navigation/sourcecontrolgroup.tsx
  12. 8
      libs/remix-ui/git/src/components/panels/remotes.tsx
  13. 8
      libs/remix-ui/git/src/components/panels/remotesimport.tsx
  14. 9
      libs/remix-ui/git/src/components/panels/tokenWarning.tsx

@ -208,7 +208,7 @@ export const GitUI = (props: IGitUi) => {
<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 py-2"> <div className="px-2 py-2">
<Remotes plugin={plugin}></Remotes> <Remotes></Remotes>
</div> </div>
</Accordion.Collapse> </Accordion.Collapse>
<hr></hr> <hr></hr>

@ -20,7 +20,9 @@ export const BranchesNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between pt-1 ' + (activePanel === eventKey? 'bg-light': '')}> <div className={'d-flex justify-content-between pt-1 ' + (activePanel === eventKey? 'bg-light': '')}>
<span data-id='branches-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span data-id='branches-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-2 nav form-check-label">BRANCHES</label> <label className="pl-2 nav form-check-label">BRANCHES</label>
<LoaderIndicator></LoaderIndicator> <LoaderIndicator></LoaderIndicator>
</span> </span>

@ -17,7 +17,9 @@ export const CloneNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between pb-1 pt-1 ' + (activePanel === eventKey? 'bg-light': '')}> <div className={'d-flex justify-content-between pb-1 pt-1 ' + (activePanel === eventKey? 'bg-light': '')}>
<span data-id='clone-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span data-id='clone-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-2 nav form-check-label ">CLONE</label> <label className="pl-2 nav form-check-label ">CLONE</label>
<LoaderIndicator></LoaderIndicator> <LoaderIndicator></LoaderIndicator>
</span> </span>

@ -22,7 +22,9 @@ export const CommandsNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between ' + (activePanel === eventKey ? 'bg-light' : '')}> <div className={'d-flex justify-content-between ' + (activePanel === eventKey ? 'bg-light' : '')}>
<span data-id='commands-panel' onClick={() => handleClick()} role={'button'} className="nav d-flex justify-content-start align-items-center w-75"> <span data-id='commands-panel' onClick={() => handleClick()} role={'button'} className="nav d-flex justify-content-start align-items-center w-75">
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-2 nav form-check-label">COMMANDS</label> <label className="pl-2 nav form-check-label">COMMANDS</label>
</span> </span>
<LoaderIndicator></LoaderIndicator> <LoaderIndicator></LoaderIndicator>

@ -43,7 +43,9 @@ export const CommitsNavigation = ({ eventKey, activePanel, callback, title, bran
<> <>
<div className={`d-flex justify-content-between ${activePanel === eventKey ? 'bg-light' : ''} ${ahead || behind? 'text-success':''}`}> <div className={`d-flex justify-content-between ${activePanel === eventKey ? 'bg-light' : ''} ${ahead || behind? 'text-success':''}`}>
<span data-id={`commits-panel${ahead?'-ahead':''}${behind?'-behind':''}`} onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-100'> <span data-id={`commits-panel${ahead?'-ahead':''}${behind?'-behind':''}`} onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-100'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
{ahead? <FontAwesomeIcon className='ml-1' icon={faCloudArrowUp}></FontAwesomeIcon> : null} {ahead? <FontAwesomeIcon className='ml-1' icon={faCloudArrowUp}></FontAwesomeIcon> : null}
{behind? <FontAwesomeIcon className='ml-1' icon={faCloudArrowDown}></FontAwesomeIcon> : null} {behind? <FontAwesomeIcon className='ml-1' icon={faCloudArrowDown}></FontAwesomeIcon> : null}
<label className={`pl-2 nav form-check-label ${ahead || behind? 'text-success':''}`}>{title}</label> <label className={`pl-2 nav form-check-label ${ahead || behind? 'text-success':''}`}>{title}</label>

@ -18,7 +18,9 @@ export const GitHubNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between pt-1 pb-1 ' + (activePanel === eventKey? 'bg-light': '')}> <div className={'d-flex justify-content-between pt-1 pb-1 ' + (activePanel === eventKey? 'bg-light': '')}>
<span data-id='github-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span data-id='github-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-2 nav form-check-label">GITHUB SETUP</label> <label className="pl-2 nav form-check-label">GITHUB SETUP</label>
</span> </span>
</div> </div>

@ -47,7 +47,9 @@ export const LogNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between pt-1 pb-1 ' + (activePanel === eventKey ? 'bg-light' : '')}> <div className={'d-flex justify-content-between pt-1 pb-1 ' + (activePanel === eventKey ? 'bg-light' : '')}>
<span onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-2 nav form-check-label mr-2">LOG</label> <label className="pl-2 nav form-check-label mr-2">LOG</label>
{logState.errorCount > 0 && ( {logState.errorCount > 0 && (
<div className="text-danger mr-1"> <div className="text-danger mr-1">

@ -20,7 +20,9 @@ export const RemotesNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between pt-1 pb-1 ' + (activePanel === eventKey? 'bg-light': '')}> <div className={'d-flex justify-content-between pt-1 pb-1 ' + (activePanel === eventKey? 'bg-light': '')}>
<span data-id='remotes-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span data-id='remotes-panel' onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-2 nav form-check-label">REMOTES</label> <label className="pl-2 nav form-check-label">REMOTES</label>
<LoaderIndicator></LoaderIndicator> <LoaderIndicator></LoaderIndicator>
</span> </span>

@ -21,7 +21,9 @@ export const SettingsNavigation = ({ eventKey, activePanel, callback }) => {
<> <>
<div className={'d-flex justify-content-between ' + (activePanel === eventKey ? 'bg-light' : '')}> <div className={'d-flex justify-content-between ' + (activePanel === eventKey ? 'bg-light' : '')}>
<span onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="nav pl-2 form-check-label">SETTINGS</label> <label className="nav pl-2 form-check-label">SETTINGS</label>
</span> </span>

@ -27,7 +27,9 @@ export const SourceControlNavigation = ({ eventKey, activePanel, callback }) =>
<div className={'d-flex align-items-center justify-content-between ' + (activePanel === eventKey ? 'bg-light' : '')}> <div className={'d-flex align-items-center justify-content-between ' + (activePanel === eventKey ? 'bg-light' : '')}>
<span data-id='sourcecontrol-panel' onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75' <span data-id='sourcecontrol-panel' onClick={() => handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'
> >
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="nav pl-2 form-check-label">SOURCE CONTROL</label> <label className="nav pl-2 form-check-label">SOURCE CONTROL</label>
<LoaderIndicator></LoaderIndicator> <LoaderIndicator></LoaderIndicator>

@ -31,7 +31,9 @@ export const SourceControlGroupNavigation = (props: SourceControlGroupNavigation
<> <>
<div className={'d-flex justify-content-between pt-1 ' + (activePanel === eventKey? 'bg-light': '')}> <div className={'d-flex justify-content-between pt-1 ' + (activePanel === eventKey? 'bg-light': '')}>
<span onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'> <span onClick={()=>handleClick()} role={'button'} className='nav d-flex justify-content-start align-items-center w-75'>
<i className={ activePanel !== eventKey ? "fa fa-caret-right" : "fa fa-caret-down" }></i> {
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon>
}
<label className="pl-1 nav form-check-label">{group.name}</label> <label className="pl-1 nav form-check-label">{group.name}</label>
</span> </span>
{ {

@ -4,11 +4,7 @@ import { gitPluginContext } from "../gitui"
import { Remoteselect } from "./remoteselect" import { Remoteselect } from "./remoteselect"
import { RemotesImport } from "./remotesimport" import { RemotesImport } from "./remotesimport"
export interface RemotesProps { export const Remotes = () => {
plugin: any
}
export const Remotes = (props: RemotesProps) => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
const [remoteName, setRemoteName] = React.useState<string>('') const [remoteName, setRemoteName] = React.useState<string>('')
@ -31,7 +27,7 @@ export const Remotes = (props: RemotesProps) => {
return ( return (
<> <>
<div data-id="remotes-panel-content" className="d-flex flex-column"> <div data-id="remotes-panel-content" className="d-flex flex-column">
<RemotesImport plugin={props.plugin} /> <RemotesImport />
<hr className="mt-0 border border-2" /> <hr className="mt-0 border border-2" />
{context.remotes && context.remotes.length ? {context.remotes && context.remotes.length ?
<div> <div>

@ -8,11 +8,7 @@ import { selectStyles, selectTheme } from "../../types/styles"
import { TokenWarning } from "./tokenWarning" import { TokenWarning } from "./tokenWarning"
import RepositorySelect from "../github/repositoryselect" import RepositorySelect from "../github/repositoryselect"
export interface RemotesImportProps { export const RemotesImport = () => {
plugin: any
}
export const RemotesImport = (props: RemotesImportProps) => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
const [repo, setRepo] = useState<repository>(null); const [repo, setRepo] = useState<repository>(null);
@ -69,7 +65,7 @@ export const RemotesImport = (props: RemotesImportProps) => {
return ( return (
<> <>
<RepositorySelect select={selectRepo} /> <RepositorySelect select={selectRepo} />
<TokenWarning plugin={props.plugin} /> <TokenWarning />
{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}

@ -1,18 +1,13 @@
import { gitPluginContext } from "../gitui" import { gitPluginContext } from "../gitui"
import React, { useEffect, useState } from "react" import React, { useEffect, useState } from "react"
export interface TokenWarningProps { export const TokenWarning = () => {
plugin: any
}
export const TokenWarning = (props: TokenWarningProps) => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
return (<> return (<>
{(context.gitHubUser && context.gitHubUser.login) ? null : {(context.gitHubUser && context.gitHubUser.login) ? null :
<span className="text-warning text-left"> <span className="text-warning text-left">
<span>Generate and add a Git token to use this plugin. Tokens are added in </span><span className=" text-decoration-line-through messageTip" onClick={async () => { <span>Generate and add a Git token to use this plugin. Tokens are added in </span><span className=" text-decoration-line-through messageTip" onClick={async () => {
await props.plugin.call('menuicons', 'select', 'settings') }}>settings.</span>
}}>settings</span><span> of the IDE.</span>
</span> </span>
} }
</> </>

Loading…
Cancel
Save