Merge pull request 'issue任务上线' (#108) from caishi/forgeplus-react:feature_repo_second_page into feature_repo_second_page
This commit is contained in:
commit
9ce86f4102
|
@ -87,6 +87,13 @@
|
|||
line-height: 30px;
|
||||
padding:0px 5px;
|
||||
margin-left: 20px!important;
|
||||
&.ant-menu-item-selected{
|
||||
border-color:#466aff!important;
|
||||
color:#466aff!important;
|
||||
}
|
||||
&.ant-menu-item-active{
|
||||
border-color:transparent ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +116,7 @@
|
|||
color: #333;
|
||||
}
|
||||
&.ant-menu-item-selected{
|
||||
border-color:#1890ff!important;
|
||||
border-color:#466aff!important;
|
||||
}
|
||||
&.ant-menu-item-active{
|
||||
border-color:transparent ;
|
||||
|
|
|
@ -121,12 +121,13 @@ function CoderDepot(props){
|
|||
setTreeValue(url);
|
||||
getFileInfo(url,branchName);
|
||||
setType("file");
|
||||
getReadmeInfo(url,branchName);
|
||||
// getReadmeInfo(url,branchName);
|
||||
// setReadme(undefined);
|
||||
}else{
|
||||
setTreeValue(undefined);
|
||||
getDirInfo(branchName || defaultBranch);
|
||||
setType("dir");
|
||||
getReadmeInfo('', branchName || defaultBranch);
|
||||
// getReadmeInfo('', branchName || defaultBranch);
|
||||
}
|
||||
}
|
||||
},[projectsId,owner,pathname,defaultBranch])
|
||||
|
@ -183,6 +184,7 @@ function CoderDepot(props){
|
|||
// setReadme(result.data.readme);
|
||||
setEditReadme(false);
|
||||
setHide(true);
|
||||
getReadmeInfo('', branchName || defaultBranch);
|
||||
}
|
||||
setTimeout(function(){setIsSpin(false);},500);
|
||||
}).catch(error=>{setIsSpin(false);})
|
||||
|
@ -215,16 +217,17 @@ function CoderDepot(props){
|
|||
setDirInfo(undefined);
|
||||
setFileInfo(en);
|
||||
setType(en.type);
|
||||
setReadme(undefined);
|
||||
}else{
|
||||
setFileInfo(undefined);
|
||||
setDirInfo(en);
|
||||
setType("dir");
|
||||
getReadmeInfo(path, branchName || defaultBranch);
|
||||
}
|
||||
let c = result.data.last_commit
|
||||
setLastCommit(c && c.commit);
|
||||
setLastCommitAuthor(c && c.committer);
|
||||
setMainFlag(false);
|
||||
// setReadme(result.data.readme);
|
||||
setReadOnly(true);
|
||||
setReadOnly(!editReadme);
|
||||
setHide(true);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue