Merge pull request '代码库二级页面issue更改' (#96) from hc1913847458/forgeplus-react:feature_repo_second_page into feature_repo_second_page

This commit is contained in:
jasder 2021-09-30 15:55:06 +08:00
commit 0629d87a9f
4 changed files with 11 additions and 7 deletions

View File

@ -201,6 +201,7 @@ function CoderDepot(props){
setLastCommit(c && c.commit);
setLastCommitAuthor(c && c.committer);
setMainFlag(false);
setReadme(result.data.readme)
setReadOnly(true);
setReadOnly(!editReadme);
setHide(true);

View File

@ -6,6 +6,7 @@ import { Link } from 'react-router-dom';
import { truncateCommitId } from '../../common/util';
import './Index.scss';
import Tree from '../img/tree.png'
import moment from 'moment';
function Tags(props) {
@ -44,7 +45,7 @@ function Tags(props) {
return (
<span className="color-grey-3">
<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>
)
}
@ -56,7 +57,7 @@ function Tags(props) {
ellipsis:true,
render:(txt,item)=>{
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"/>
<Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`}>{truncateCommitId(item.id)}</Link>
</Tooltip>
@ -82,12 +83,13 @@ function Tags(props) {
render:(txt,item)=>{
return (
<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
</Link>
<Link to={`/${owner}/${projectsId}/pulls/new/${item.name}`} className="btn-83 ml15">
</a>
<a href={`${item.zipball_url}`} download className="btn-83">
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
</Link>
</a>
</div>
)
}

View File

@ -63,7 +63,7 @@ function Index(props) {
<div className="treeinfo">
<Link to={`/${owner}/${projectsId}/tree/${turnbar(i.name)}`} className="task-hide">{i.name}</Link>
<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="color-grey-3">更新于{last_commit && last_commit.time_from_now}</span>
</div>

View File

@ -306,6 +306,7 @@ form{
border-radius: 5px;
font-weight: 500;
color: #333333!important;
margin-right: 15px;
&:hover{
background: #F3F4F6;
color: #333333!important;