forked from Gitlink/forgeplus-react
Merge pull request 'FIX bug' (#126) from pre_develop_dev into pre_develop
This commit is contained in:
commit
a489271a2f
|
@ -42,6 +42,12 @@ const Infos = styled.div`
|
|||
}
|
||||
}
|
||||
`;
|
||||
function turnbar(str){
|
||||
if(str && str.length>0 && str.indexOf("/")>-1){
|
||||
return str.replaceAll('/','%2F');
|
||||
}
|
||||
return str;
|
||||
}
|
||||
//提交详情页
|
||||
export default (props) => {
|
||||
const {match , history } = props;
|
||||
|
@ -81,7 +87,7 @@ export default (props) => {
|
|||
{commit && commit.message &&
|
||||
<pre className="task-hide">{commit.message}</pre>
|
||||
}
|
||||
<Link to={`/${owner}/${projectsId}/tree/${data.branch}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link>
|
||||
</div>
|
||||
<Button type="primary" onClick={()=>{history.push(`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`)}} className="btnblue" style={{height:"36px"}}>浏览文件</Button>
|
||||
</div>
|
||||
|
|
|
@ -100,7 +100,10 @@ function Files({ data,history,owner,projectsId , parentsSha }){
|
|||
<Progress showInfo = {false} strokeColor = "#2DB44D" size="small" percent={item.addition/(item.addition+item.deletion)*100} />
|
||||
<span className="ml10">{item.addition+item.deletion}处</span>
|
||||
</Tooltip>
|
||||
<span className="see-file-btn" onClick={()=>{history.push(`/${owner}/${projectsId}${item.isDeleted ? `/commits/${truncateCommitId(parentsSha)}`:`/tree/${truncateCommitId(item.sha)}/${item.name}`}`)}}>查看文件</span>
|
||||
{
|
||||
!item.isSubmodule &&
|
||||
<span className="see-file-btn" onClick={()=>{history.push(`/${owner}/${projectsId}${item.isDeleted ? `/commits/${truncateCommitId(parentsSha)}`:`/tree/${truncateCommitId(item.sha)}/${item.name}`}`)}}>查看文件</span>
|
||||
}
|
||||
</div>
|
||||
</FlexAJ>
|
||||
{
|
||||
|
|
|
@ -364,7 +364,7 @@ class MessageCount extends Component {
|
|||
to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
|
||||
className="ver-middle"
|
||||
>
|
||||
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {turnbar(data.pull_request && data.pull_request.head)}
|
||||
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {data.pull_request && data.pull_request.head}
|
||||
</Link>
|
||||
</Tag>
|
||||
<span className="mr8 ver-middle">
|
||||
|
|
|
@ -208,4 +208,8 @@ form .ant-cascader-picker, form .ant-select {
|
|||
}
|
||||
.linesContent.add{
|
||||
background: rgba(48, 232, 132, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.mergeRequest .folders{
|
||||
width: 72rem;
|
||||
}
|
|
@ -119,7 +119,7 @@ class MergeFooter extends Component {
|
|||
|
||||
return (
|
||||
!footer_type && !comparesData || (comparesData && ((comparesData.commits && comparesData.commits.length===0)||(comparesData && !comparesData.diff)) )?"":
|
||||
<div className="main" style={{paddingTop:"0px"}}>
|
||||
<div className="main mergeRequest" style={{paddingTop:"0px"}}>
|
||||
<Spin spinning={isSpin}>
|
||||
<Tabs
|
||||
activeKey={activeKey}
|
||||
|
|
Loading…
Reference in New Issue