parent
b3252a04a6
commit
02e1d29084
@ -0,0 +1,30 @@ |
||||
import { faArrowDown, faArrowUp, faArrowsUpDown, faArrowRotateRight } from "@fortawesome/free-solid-svg-icons" |
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" |
||||
import { CustomTooltip } from "@remix-ui/helper" |
||||
import React, { useState } from "react" |
||||
import { FormattedMessage } from "react-intl" |
||||
import { branch, remote } from "../../types" |
||||
|
||||
interface SourceControlButtonsProps { |
||||
remote?: remote, |
||||
branch?: branch |
||||
} |
||||
|
||||
export const SourceControlButtons = (props: SourceControlButtonsProps) => { |
||||
const { remote, branch } = props |
||||
|
||||
return (<span className='d-flex justify-content-end align-items-center w-25'> |
||||
<CustomTooltip tooltipText={<FormattedMessage id="git.pull" />}> |
||||
<button onClick={async () => { }} className='btn btn-sm'><FontAwesomeIcon icon={faArrowDown} className="" /></button> |
||||
</CustomTooltip> |
||||
<CustomTooltip tooltipText={<FormattedMessage id="git.push" />}> |
||||
<button onClick={async () => { }} className='btn btn-sm'><FontAwesomeIcon icon={faArrowUp} className="" /></button> |
||||
</CustomTooltip> |
||||
<CustomTooltip tooltipText={<FormattedMessage id="git.sync" />}> |
||||
<button onClick={async () => { }} className='btn btn-sm'><FontAwesomeIcon icon={faArrowsUpDown} className="" /></button> |
||||
</CustomTooltip> |
||||
<CustomTooltip tooltipText={<FormattedMessage id="git.refresh" />}> |
||||
<button onClick={async () => { }} className='btn btn-sm'><FontAwesomeIcon icon={faArrowRotateRight} className="" /></button> |
||||
</CustomTooltip> |
||||
</span>) |
||||
} |
@ -0,0 +1,31 @@ |
||||
import { ReadCommitResult } from "isomorphic-git"; |
||||
import { Accordion } from "react-bootstrap"; |
||||
import React, { useEffect, useState } from "react"; |
||||
import { CommitDetails } from "../commits/commitdetails"; |
||||
import { CommitsNavigation } from "../../navigation/commits"; |
||||
|
||||
export interface BrancheDifferenceProps { |
||||
commits: ReadCommitResult[]; |
||||
title: string |
||||
} |
||||
|
||||
export const BranchDifferenceDetails = (props: BrancheDifferenceProps) => { |
||||
const { commits, title } = props; |
||||
const [activePanel, setActivePanel] = useState<string>(""); |
||||
|
||||
if (commits.length === 0) return null |
||||
|
||||
return ( |
||||
<Accordion activeKey={activePanel} defaultActiveKey=""> |
||||
<CommitsNavigation title={title} eventKey="0" activePanel={activePanel} callback={setActivePanel} /> |
||||
<Accordion.Collapse className="pl-2 border-left ml-1" eventKey="0"> |
||||
<div className="ml-1"> |
||||
{commits && commits.map((commit, index) => { |
||||
return ( |
||||
<CommitDetails key={index} checkout={()=>{}} commit={commit}></CommitDetails> |
||||
); |
||||
})} |
||||
</div> |
||||
</Accordion.Collapse> |
||||
</Accordion>) |
||||
} |
Loading…
Reference in new issue