banner
This commit is contained in:
parent
d16ee801ec
commit
a3226dca4e
|
@ -0,0 +1,73 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
function DetailBanner({ isManager , url , pathname , owner , projectsId , state , urlFlag , projectDetail , platform ,open_devops }){
|
||||||
|
return(
|
||||||
|
<div className="f-wrap-between mt15">
|
||||||
|
<ul className="headerMenu-wrapper">
|
||||||
|
<li className={pathname==="about" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}/about`, state }}>
|
||||||
|
<i className={(pathname==="" || urlFlag) ? "iconfont icon-zhuye1 color-grey-3 mr5 font-14":"iconfont icon-zhuye1 color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>主页</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className={(pathname==="" || urlFlag) ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}`, state }}>
|
||||||
|
<i className={(pathname==="" || urlFlag) ? "iconfont icon-daimaku color-grey-3 mr5 font-14":"iconfont icon-daimaku color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>代码库</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className={pathname==="issues" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
|
||||||
|
<i className={pathname==="issues" ? "iconfont icon-renwu color-grey-3 mr5 font-14":"iconfont icon-renwu color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>易修 (Issue)</span>
|
||||||
|
{projectDetail && projectDetail.issues_count ? <span className="num">{projectDetail.issues_count}</span> : ""}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
{
|
||||||
|
projectDetail && parseInt(projectDetail.type) !== 2 && platform &&
|
||||||
|
<li className={pathname==="pulls" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}/pulls`, state }}>
|
||||||
|
<i className={pathname==="pulls" ? "iconfont icon-hebingqingqiu1 color-grey-3 mr5 font-14":"iconfont icon-hebingqingqiu1 color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>合并请求</span>
|
||||||
|
{projectDetail && projectDetail.pull_requests_count ? <span className="num">{projectDetail.pull_requests_count}</span> : ""}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
platform &&
|
||||||
|
<li className={pathname==="devops" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}>
|
||||||
|
<i className="iconfont icon-gongzuoliu font-13 mr8"></i>工作流(beta版)
|
||||||
|
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
<li className={pathname==="milestones" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}/milestones`, state }}>
|
||||||
|
<i className={pathname==="milestones" ? "iconfont icon-lichengbei color-grey-3 mr5 font-14":"iconfont icon-lichengbei color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>里程碑</span>
|
||||||
|
{projectDetail && projectDetail.versions_count ? <span className="num">{projectDetail.versions_count}</span> :""}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className={pathname==="activity" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/projects/${owner}/${projectsId}/activity`, state }}>
|
||||||
|
<i className={pathname==="activity" ? "iconfont icon-tongzhi color-grey-3 mr5 font-14":"iconfont icon-tongzhi color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>动态</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
{
|
||||||
|
isManager && platform &&
|
||||||
|
<li className={url.indexOf("/setting") > 0 ? "active" : ""}>
|
||||||
|
<Link to={`/projects/${owner}/${projectsId}/setting`}>
|
||||||
|
<i className={url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>仓库设置</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default DetailBanner;
|
Loading…
Reference in New Issue