fix issue

This commit is contained in:
caishi 2021-09-30 19:58:03 +08:00
parent 1a5f81887a
commit 5b2198ce4c
3 changed files with 10 additions and 5 deletions

View File

@ -128,6 +128,7 @@ class CoderRootCommit extends Component{
const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state;
const { projectDetail, commit_class , defaultBranch } = this.props;
const { projectsId , owner , branchName } = this.props.match.params;
console.log(branchName);
let branch = returnbar(branchName || defaultBranch);
return(
<React.Fragment>

View File

@ -38,14 +38,14 @@ function Tags(props) {
},
{
title:"创建时间",
dataIndex:"time",
dataIndex:"time_ago",
key:2,
ellipsis:true,
render:(txt,item)=>{
return (
<span className="color-grey-3">
<Link className="mr3" style={{fontWeight:"500"}} to={`/${item.commit && item.commit.login}`} >{item.commit && item.commit.name}</Link>
<span>创建于{item.commit && item.commit.time_ago}</span>
<span>创建于{txt}</span>
</span>
)
}

View File

@ -63,7 +63,11 @@ function Index(props) {
<div className="treeinfo">
<Link to={`/${owner}/${projectsId}/tree/${turnbar(i.name)}`} className="task-hide">{i.name}</Link>
<div>
<img style={{borderRadius:"50%"}} src={getImageUrl(`${last_commit && last_commit.committer && last_commit.committer.image_url}`)} alt=""/>
{
<Link to={`/${last_commit && last_commit.committer && last_commit.committer.login}`}>
<img style={{borderRadius:"50%"}} src={getImageUrl(`/${last_commit && last_commit.committer && last_commit.committer.image_url}`)} alt=""/>
</Link>
}
<span className="mr3 color-grey-3" style={{fontWeight:"500"}}>{last_commit && last_commit.committer && last_commit.committer.name}</span>
<span className="color-grey-3">更新于{last_commit && last_commit.time_from_now}</span>
</div>
@ -72,7 +76,7 @@ function Index(props) {
<div>
<span>
<img src={Tree} alt="sha" width={"16px"}/>
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(last_commit && last_commit.sha)}`}>{truncateCommitId(last_commit && last_commit.sha)}</Link>
<Link to={`/${owner}/${projectsId}/commits/branch/${truncateCommitId(last_commit && last_commit.sha)}`}>{truncateCommitId(last_commit && last_commit.sha)}</Link>
<input type="text" id={`value${key}${k}`} value={`${truncateCommitId(last_commit && last_commit.sha)}`}/>
</span>
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${key}${k}`}/>
@ -81,7 +85,7 @@ function Index(props) {
<div className="treeabout">
{
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
<Link to={`/${owner}/${projectsId}/pulls/new/${item.name}`} className="btn-83">+ 合并请求</Link>
<Link to={`/${owner}/${projectsId}/pulls/new/${i.name}`} className="btn-83">+ 合并请求</Link>
}
<Dropdown overlay={menu(i.zip_url,i.tar_url)} trigger={['click']} placement="bottomRight">
<a className="btn-83 ml15">下载<i className="iconfont icon-sanjiaoxing-down font-14"></i></a>