Merge branch 'pre_develop_dev' of https://git.trustie.net/Gitlink/forgeplus-react into testdev

This commit is contained in:
hucong 2021-10-12 13:38:26 +08:00
commit 8b186467a4
2 changed files with 31 additions and 10 deletions

View File

@ -4,6 +4,7 @@ import { Table , Tooltip , Spin } from 'antd';
import axios from 'axios';
import { Link } from 'react-router-dom';
import { truncateCommitId } from '../../common/util';
import { getImageUrl } from 'educoder';
import Nonedata from '../../Nodata';
import './Index.scss';
import Tree from '../img/tree.png'
@ -34,12 +35,12 @@ function Tags(props) {
dataIndex:"name",
key:1,
ellipsis:true,
width:"200px",
render:(txt,item)=>{
return(
<div className="tagBranch">
<Link className="hover tagClass" to={`/${owner}/${projectsId}/tree/${item.name}`}>{item.name}</Link>
</div>
<Link className="hover tagClass" to={`/${owner}/${projectsId}/tree/${item.name}`}>{item.name}</Link>
</div>
)
}
},
@ -51,7 +52,21 @@ function Tags(props) {
render:(txt,item)=>{
return (
<span className="color-grey-3 tagModel">
<Link className="mr3" style={{fontWeight:"500"}} to={`/${item.tagger && item.tagger.login}`} >{item.tagger && item.tagger.name}</Link>
{
item.tagger &&
<Tooltip placement="top" title={item.tagger.name}>
{
item.tagger.id ?
<Link className="mr3 tagModelImg" to={`/${item.tagger.login}`} >
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt=""/>
</Link>
:
<span className="mr3 tagModelImg" style={{cursor:"default"}}>
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt=""/>
</span>
}
</Tooltip>
}
<span>创建于{txt}</span>
</span>
)
@ -86,17 +101,17 @@ function Tags(props) {
key:5,
ellipsis:true,
align:"center",
width:"181px",
width:"204px",
render:(txt,item)=>{
return (
<div>
<React.Fragment>
<a href={`${item.tarball_url}`} download className="btn-83">
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR
</a>
<a href={`${item.zipball_url}`} download className="btn-83">
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
</a>
</div>
</React.Fragment>
)
}
}

View File

@ -13,6 +13,9 @@
}
}
tbody{
.btn-83{
margin:0px 8px;
}
tr{
&:hover td{
background-color: #fff!important;
@ -23,7 +26,6 @@
line-height: 69px;
color:#333333;
div{
padding-left: 69px;
font-weight: 500;
}
}
@ -43,8 +45,7 @@
justify-content: center;
}
.tagBranch{
width: 200px;
margin-left: -67px;
padding-right: 15px;
text-overflow: ellipsis;
overflow: hidden;
.tagClass{
@ -53,4 +54,9 @@
}
.tagModel{
font-weight: 400;
.tagModelImg img{
width: 25px;
height: 25px;
border-radius: 50%;
}
}