From 08047fb002f5470b7800b036da3f3e098100824e Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Thu, 30 Sep 2021 13:43:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2issue=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 1 + src/forge/Main/tag/Index.jsx | 14 ++++++++------ src/forge/Main/tree/Index.jsx | 2 +- src/forge/css/index.scss | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 02a829a7b..e473f9b93 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -191,6 +191,7 @@ function CoderDepot(props){ setLastCommit(c && c.commit); setLastCommitAuthor(c && c.committer); setMainFlag(false); + setReadme(result.data.readme) setReadOnly(true); setReadOnly(!editReadme); setHide(true); diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 54586b144..d5c2593e9 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -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 ( {item.commit && item.commit.name} - 创建于{item.commit && item.commit.time} + 创建于{item.commit && item.commit.time_ago} ) } @@ -56,7 +57,7 @@ function Tags(props) { ellipsis:true, render:(txt,item)=>{ return ( - + 提交ID {truncateCommitId(item.id)} @@ -82,12 +83,13 @@ function Tags(props) { render:(txt,item)=>{ return (
- + + TAR - - + + ZIP - +
) } diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index 3d532de5f..9324cd596 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -63,7 +63,7 @@ function Index(props) {
{i.name}
- + {last_commit && last_commit.committer && last_commit.committer.name} 更新于{last_commit && last_commit.time_from_now}
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index dfca6e632..319d4670a 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -306,6 +306,7 @@ form{ border-radius: 5px; font-weight: 500; color: #333333!important; + margin-right: 15px; &:hover{ background: #F3F4F6; color: #333333!important;