This commit is contained in:
caishi 2021-09-10 09:50:29 +08:00
parent 06f3eacb9d
commit 81623b38f7
9 changed files with 53 additions and 46 deletions

View File

@ -26,9 +26,9 @@ export default (({ projectsId , branch , owner , changeBranch , branchList , tag
<div className="branch-tagBox">
{/* {nav === 0 ?"分支":"标签"} */}
<span className="color-grey-9 mr3 ml8"><i className="iconfont icon-fenzhi2 font-18"></i></span>
<a className="ant-dropdown-link task-hide">
<span className="ant-dropdown-link task-hide" style={{fontWeight:"500"}}>
{showValue}
</a>
</span>
<i className="showtag iconfont icon-sanjiaoxing-down font-15 color-grey-9 mr5 ml5 mt1" />
</div>
</Dropdown>

View File

@ -163,6 +163,8 @@ li.ant-menu-item{
}
}
.hoverA{
display: flex;
align-items: center;
&:hover a{
color:#2A61FF !important ;
}

View File

@ -149,10 +149,9 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
return(
<div className="halfs">
<AlignCenter className="hoverA">
<Link to={`/${owner}/${projectsId}/contribute`} className="font-16 color-ooo">贡献者</Link>
<Link to={`/${owner}/${projectsId}/contribute`} className="font-16 color-ooo hoverA">贡献者
{ contributors && contributors.total_count > 0 && <span className="infoCount">{contributors.total_count}</span>}
</AlignCenter>
</Link>
<div className="attrPerson" onMouseLeave={()=>setVisibleFunc(false)}>
{
total > 0 ?

View File

@ -31,6 +31,7 @@ function CopyTool({ beforeText, afterText, className , inputId , timeOut }) {
if(timeOut){
setTimeout(function(){
setTitle(beforeText);
document.getSelection().removeAllRanges();
},1500)
}
}, []);

View File

@ -6,15 +6,9 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
return(
<div>
<FlexAJ>
<AlignCenter className="hoverA">
<Link to={`/${owner}/${projectsId}/releases`} className="font-16 color-ooo">发行版</Link>
{ releaseVersions && releaseVersions.total_count > 0 && <span className="infoCount">{releaseVersions.total_count}</span>}
</AlignCenter>
{/* {
baseOperate && projectType !==2 && <Link className="font-12 color-blue" to={`/projects/${owner}/${projectsId}/releases/new`}>新建</Link>
} */}
</FlexAJ>
<Link to={`/${owner}/${projectsId}/releases`} className="font-16 color-ooo hoverA">发行版
{ releaseVersions && releaseVersions.total_count > 0 && <span className="infoCount">{releaseVersions.total_count}</span>}
</Link>
{
releaseVersions && releaseVersions.total_count>0 ?
releaseVersions.list.map((item,key)=>{

View File

@ -209,7 +209,7 @@ function CoderDepot(props){
let b = branchName || defaultBranch;
let checkvalue = turnbar(b);
return (
<Menu>
<Menu className="fileMenu">
<Menu.Item>
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</CheckProfile>
</Menu.Item>
@ -354,13 +354,15 @@ function CoderDepot(props){
<AlignCenter className="mr20">
<Link to={`/${owner}/${projectsId}/branches`} className="iconBtn">
<i className="iconfont icon-master_icon font-16"></i>
分支<span>{projectDetail && projectDetail.branches && projectDetail.branches.total_count}</span>
<span>分支</span>
<span>{projectDetail && projectDetail.branches && projectDetail.branches.total_count}</span>
</Link>
</AlignCenter>
<AlignCenter className="mr20">
<Link to={`/${owner}/${projectsId}/tags`} className="iconBtn">
<i className="iconfont icon-biaoqianicon font-16"></i>
标签<span>{projectDetail && projectDetail.tags && projectDetail.tags.total_count}</span>
<span>标签</span>
<span>{projectDetail && projectDetail.tags && projectDetail.tags.total_count}</span>
</Link>
</AlignCenter>
</AlignCenter>
@ -379,8 +381,13 @@ function CoderDepot(props){
</div>
}
{ fileOperate &&
<Dropdown overlay={fileMenu()} className="mr10" trigger={['click']}>
<Button type="default">文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-6 mr-5"></i></Button>
<Dropdown
overlay={fileMenu()}
className="mr10"
trigger={['click']}
getPopupContainer={document.parentNode}
>
<a>文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-6 mr-5"></i></a>
</Dropdown>
}
@ -404,8 +411,8 @@ function CoderDepot(props){
<span className="ml20 color-grey-6 font-12 mt3">{lastCommit.time_from_now}</span>
{
commitCount ?
<Link to={`/${owner}/${projectsId}/commits/branch/${turnbar(branchName || defaultBranch)}`} className="ml12 color-grey-9"style={{height:"28px",lineHeight:"28px"}}>
<i className="iconfont icon-tijiaoicon mr3 font-16 color-grey-6"></i>{commitCount}次提交
<Link to={`/${owner}/${projectsId}/commits/branch/${turnbar(branchName || defaultBranch)}`} className="ml20 color-grey-3"style={{height:"28px",lineHeight:"28px"}}>
<i className="iconfont icon-tijiaoicon mr3 font-16"></i><span style={{fontWeight:"500"}}>{commitCount}次提交</span>
</Link>:""
}
</div>

View File

@ -14,16 +14,15 @@
}
}
.iconBtn{
color: #666;
i{
margin-right: 4px;
color: #666;
}
span{
margin-left: 4px;
color: #333;
color: #333!important;
}
&:hover span{
color: #466AFF;
&:hover span,&:hover i{
color: #466AFF!important;
}
}
/* recommandProjects */
@ -144,14 +143,15 @@
.ant-btn-primary{
color: #fff;
background-color: #466AFF;
border-color: #466AFF;
}
}
}
.addOptionBtn{
.depotBtn,.addOptionBtn{
display: flex;
a{
color: #333!important;
font-weight: 500;
font-weight: 500!important;
border-radius: 5px;
width: 83px;
height: 32px;
@ -196,15 +196,15 @@
}
.progress{
display: flex;
border-radius: 10px;
height: 7px;
border-radius: 2px;
height: 11px;
margin-top: 12px;
span{
&:first-child{
border-radius: 10px 0px 0px 10px;
border-radius: 2px 0px 0px 2px;
}
&:last-child{
border-radius: 0px 10px 10px 0px;
border-radius: 0px 2px 2px 0px;
}
}
}
@ -383,6 +383,14 @@
line-height: 50px;
}
}
.fileMenu{
width: 83px;
li{
padding:6px 0px!important;
text-align: center;
width: 100%;
}
}
.catelogue{
cursor: pointer;
@ -417,7 +425,7 @@
.pinfos{
i,a{color: #666;}
&:hover i,&:hover a{
color: #2A61FF;
color: #2A61FF!important;
}
}
.graph{

View File

@ -236,10 +236,8 @@
height: 36px;
line-height: 24px;
display: block;
color: #666;
&> img{
margin-right: 8px;
}
color: #000!important;
font-weight: 500;
}
&> span.num{
line-height: 24px;
@ -252,9 +250,7 @@
width: 24px;
height: 24px;
}
&.active a,&.active a i{
color: #466AFF!important;
}
&.active a::after,&:hover a::after{
position: absolute;
bottom:0px;

View File

@ -30,7 +30,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
item.menu_name === "home" &&
<li className={pathname==="about" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/about`, state }}>
<i className={(pathname==="" || urlFlag) ? "iconfont icon-zhuye-fill color-grey-3 mr5 font-14":"iconfont icon-zhuye-fill color-grey-6 font-14 mr5"}></i>
<i className={"iconfont icon-zhuye-fill color-grey-3 mr5 font-14"}></i>
<span>主页</span>
</Link>
</li>
@ -39,7 +39,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
item.menu_name === "code" &&
<li className={(pathname==="" || urlFlag) ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}`, state }}>
<i className={(pathname==="" || urlFlag) ? "iconfont icon-daimakuicon1 color-grey-3 mr5 font-14":"iconfont icon-daimakuicon1 color-grey-6 font-14 mr5"}></i>
<i className={"iconfont icon-daimakuicon1 color-grey-3 mr5 font-14"}></i>
<span>代码库</span>
</Link>
</li>
@ -49,7 +49,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
<li className={pathname==="issues" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/issues`, state }}>
<Tooltip title="易修是Issue的中文名即问题列表" placement="bottom">
<i className={pathname==="issues" ? "iconfont icon-yixiuicon1 color-grey-3 mr5 font-14":"iconfont icon-yixiuicon1 color-grey-6 font-14 mr5"}></i>
<i className={"iconfont icon-yixiuicon1 color-grey-3 mr5 font-14"}></i>
<span>易修</span>
</Tooltip>
</Link>
@ -60,7 +60,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
<li className={pathname==="pulls" ? "active" : ""}>
<Link to={{ pathname: `/${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>
<i className={"iconfont icon-hebingqingqiu1 color-grey-3 mr5 font-14"}></i>
<span>合并请求</span>
</Link>
{projectDetail && projectDetail.pull_requests_count ? <span className="num">{numFormat(projectDetail.pull_requests_count)}</span> : ""}
@ -70,7 +70,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
item.menu_name === "wiki" &&
<li className={pathname === "wiki" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/wiki`, state }}>
<i className={pathname==="wiki" ? "iconfont icon-a-wikiicon1 color-grey-3 mr5 font-14":"iconfont icon-a-wikiicon1 color-grey-6 font-14 mr5"}></i>
<i className={"iconfont icon-a-wikiicon1 color-grey-3 mr5 font-14"}></i>
<span>Wiki</span>
</Link>
</li>
@ -80,7 +80,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
<li className={pathname==="devops" ? "active" : ""}>
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
<i className="iconfont icon-gongzuoliuicon font-13 mr8"></i>工作流(beta版)
<i className="iconfont icon-gongzuoliuicon font-13 mr5 color-grey-3"></i>工作流(beta版)
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
</Link>
</li>