forked from Gitlink/forgeplus-react
Merge pull request '代码库二级页面issue更改' (#96) from hc1913847458/forgeplus-react:feature_repo_second_page into feature_repo_second_page
This commit is contained in:
commit
0629d87a9f
|
@ -201,6 +201,7 @@ function CoderDepot(props){
|
||||||
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);
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { Link } from 'react-router-dom';
|
||||||
import { truncateCommitId } from '../../common/util';
|
import { truncateCommitId } from '../../common/util';
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
import Tree from '../img/tree.png'
|
import Tree from '../img/tree.png'
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
|
|
||||||
function Tags(props) {
|
function Tags(props) {
|
||||||
|
@ -44,7 +45,7 @@ function Tags(props) {
|
||||||
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}</span>
|
<span>创建于{item.commit && item.commit.time_ago}</span>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -56,7 +57,7 @@ function Tags(props) {
|
||||||
ellipsis:true,
|
ellipsis:true,
|
||||||
render:(txt,item)=>{
|
render:(txt,item)=>{
|
||||||
return (
|
return (
|
||||||
<Tooltip placement="top" title={`最后提交日期:${`dddddd`}`}>
|
<Tooltip placement="top" title={`最后提交日期:${item.created_at_unix ? moment(item.created_at_unix*1000).format('YYYY-MM-DD'):''}`}>
|
||||||
<img src={Tree} alt="提交ID" width="22px" className="mr4"/>
|
<img src={Tree} alt="提交ID" width="22px" className="mr4"/>
|
||||||
<Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`}>{truncateCommitId(item.id)}</Link>
|
<Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`}>{truncateCommitId(item.id)}</Link>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
@ -82,12 +83,13 @@ function Tags(props) {
|
||||||
render:(txt,item)=>{
|
render:(txt,item)=>{
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Link to={`/${owner}/${projectsId}/pulls/new/${item.name}`} className="btn-83">
|
|
||||||
|
<a href={`${item.tarball_url}`} download className="btn-83">
|
||||||
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR
|
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR
|
||||||
</Link>
|
</a>
|
||||||
<Link to={`/${owner}/${projectsId}/pulls/new/${item.name}`} className="btn-83 ml15">
|
<a href={`${item.zipball_url}`} download className="btn-83">
|
||||||
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
|
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
|
||||||
</Link>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ 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 src={getImageUrl(`${last_commit && last_commit.committer && last_commit.image_url}`)} alt="" />
|
<img style={{borderRadius:"50%"}} src={getImageUrl(`${last_commit && last_commit.committer && last_commit.committer.image_url}`)} alt=""/>
|
||||||
<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>
|
||||||
|
|
|
@ -306,6 +306,7 @@ form{
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333333!important;
|
color: #333333!important;
|
||||||
|
margin-right: 15px;
|
||||||
&:hover{
|
&:hover{
|
||||||
background: #F3F4F6;
|
background: #F3F4F6;
|
||||||
color: #333333!important;
|
color: #333333!important;
|
||||||
|
|
Loading…
Reference in New Issue