forked from Gitlink/forgeplus-react
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;
|
line-height: 30px;
|
||||||
padding:0px 5px;
|
padding:0px 5px;
|
||||||
margin-left: 20px!important;
|
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;
|
color: #333;
|
||||||
}
|
}
|
||||||
&.ant-menu-item-selected{
|
&.ant-menu-item-selected{
|
||||||
border-color:#1890ff!important;
|
border-color:#466aff!important;
|
||||||
}
|
}
|
||||||
&.ant-menu-item-active{
|
&.ant-menu-item-active{
|
||||||
border-color:transparent ;
|
border-color:transparent ;
|
||||||
|
|
|
@ -121,12 +121,13 @@ function CoderDepot(props){
|
||||||
setTreeValue(url);
|
setTreeValue(url);
|
||||||
getFileInfo(url,branchName);
|
getFileInfo(url,branchName);
|
||||||
setType("file");
|
setType("file");
|
||||||
getReadmeInfo(url,branchName);
|
// getReadmeInfo(url,branchName);
|
||||||
|
// setReadme(undefined);
|
||||||
}else{
|
}else{
|
||||||
setTreeValue(undefined);
|
setTreeValue(undefined);
|
||||||
getDirInfo(branchName || defaultBranch);
|
getDirInfo(branchName || defaultBranch);
|
||||||
setType("dir");
|
setType("dir");
|
||||||
getReadmeInfo('', branchName || defaultBranch);
|
// getReadmeInfo('', branchName || defaultBranch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},[projectsId,owner,pathname,defaultBranch])
|
},[projectsId,owner,pathname,defaultBranch])
|
||||||
|
@ -183,6 +184,7 @@ function CoderDepot(props){
|
||||||
// setReadme(result.data.readme);
|
// setReadme(result.data.readme);
|
||||||
setEditReadme(false);
|
setEditReadme(false);
|
||||||
setHide(true);
|
setHide(true);
|
||||||
|
getReadmeInfo('', branchName || defaultBranch);
|
||||||
}
|
}
|
||||||
setTimeout(function(){setIsSpin(false);},500);
|
setTimeout(function(){setIsSpin(false);},500);
|
||||||
}).catch(error=>{setIsSpin(false);})
|
}).catch(error=>{setIsSpin(false);})
|
||||||
|
@ -215,16 +217,17 @@ function CoderDepot(props){
|
||||||
setDirInfo(undefined);
|
setDirInfo(undefined);
|
||||||
setFileInfo(en);
|
setFileInfo(en);
|
||||||
setType(en.type);
|
setType(en.type);
|
||||||
|
setReadme(undefined);
|
||||||
}else{
|
}else{
|
||||||
setFileInfo(undefined);
|
setFileInfo(undefined);
|
||||||
setDirInfo(en);
|
setDirInfo(en);
|
||||||
setType("dir");
|
setType("dir");
|
||||||
|
getReadmeInfo(path, branchName || defaultBranch);
|
||||||
}
|
}
|
||||||
let c = result.data.last_commit
|
let c = result.data.last_commit
|
||||||
setLastCommit(c && c.commit);
|
setLastCommit(c && c.commit);
|
||||||
setLastCommitAuthor(c && c.committer);
|
setLastCommitAuthor(c && c.committer);
|
||||||
setMainFlag(false);
|
setMainFlag(false);
|
||||||
// setReadme(result.data.readme);
|
|
||||||
setReadOnly(true);
|
setReadOnly(true);
|
||||||
setReadOnly(!editReadme);
|
setReadOnly(!editReadme);
|
||||||
setHide(true);
|
setHide(true);
|
||||||
|
|
|
@ -128,6 +128,7 @@ class CoderRootCommit extends Component{
|
||||||
const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state;
|
const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state;
|
||||||
const { projectDetail, commit_class , defaultBranch } = this.props;
|
const { projectDetail, commit_class , defaultBranch } = this.props;
|
||||||
const { projectsId , owner , branchName } = this.props.match.params;
|
const { projectsId , owner , branchName } = this.props.match.params;
|
||||||
|
console.log(branchName);
|
||||||
let branch = returnbar(branchName || defaultBranch);
|
let branch = returnbar(branchName || defaultBranch);
|
||||||
return(
|
return(
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
|
|
@ -38,14 +38,14 @@ function Tags(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:"创建时间",
|
title:"创建时间",
|
||||||
dataIndex:"time",
|
dataIndex:"time_ago",
|
||||||
key:2,
|
key:2,
|
||||||
ellipsis:true,
|
ellipsis:true,
|
||||||
render:(txt,item)=>{
|
render:(txt,item)=>{
|
||||||
return (
|
return (
|
||||||
<span className="color-grey-3">
|
<span className="color-grey-3">
|
||||||
<Link className="mr3" style={{fontWeight:"500"}} to={`/${item.commit && item.commit.login}`} >{item.commit && item.commit.name}</Link>
|
<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>
|
</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,11 @@ function Index(props) {
|
||||||
<div className="treeinfo">
|
<div className="treeinfo">
|
||||||
<Link to={`/${owner}/${projectsId}/tree/${turnbar(i.name)}`} className="task-hide">{i.name}</Link>
|
<Link to={`/${owner}/${projectsId}/tree/${turnbar(i.name)}`} className="task-hide">{i.name}</Link>
|
||||||
<div>
|
<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="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>
|
<span className="color-grey-3">更新于{last_commit && last_commit.time_from_now}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,7 +76,7 @@ function Index(props) {
|
||||||
<div>
|
<div>
|
||||||
<span>
|
<span>
|
||||||
<img src={Tree} alt="sha" width={"16px"}/>
|
<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)}`}/>
|
<input type="text" id={`value${key}${k}`} value={`${truncateCommitId(last_commit && last_commit.sha)}`}/>
|
||||||
</span>
|
</span>
|
||||||
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${key}${k}`}/>
|
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${key}${k}`}/>
|
||||||
|
@ -81,7 +85,7 @@ function Index(props) {
|
||||||
<div className="treeabout">
|
<div className="treeabout">
|
||||||
{
|
{
|
||||||
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
|
(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">
|
<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>
|
<a className="btn-83 ml15">下载<i className="iconfont icon-sanjiaoxing-down font-14"></i></a>
|
||||||
|
|
Loading…
Reference in New Issue