From 5b2198ce4c56502821757059b288cdb83ce001b4 Mon Sep 17 00:00:00 2001 From: caishi Date: Thu, 30 Sep 2021 19:58:03 +0800 Subject: [PATCH 1/3] fix issue --- src/forge/Main/CoderRootCommit.js | 1 + src/forge/Main/tag/Index.jsx | 4 ++-- src/forge/Main/tree/Index.jsx | 10 +++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js index 8cfa73203..ab1a0fc36 100644 --- a/src/forge/Main/CoderRootCommit.js +++ b/src/forge/Main/CoderRootCommit.js @@ -128,6 +128,7 @@ class CoderRootCommit extends Component{ const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state; const { projectDetail, commit_class , defaultBranch } = this.props; const { projectsId , owner , branchName } = this.props.match.params; + console.log(branchName); let branch = returnbar(branchName || defaultBranch); return( diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index d5c2593e9..5e296e131 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -38,14 +38,14 @@ function Tags(props) { }, { title:"创建时间", - dataIndex:"time", + dataIndex:"time_ago", key:2, ellipsis:true, render:(txt,item)=>{ return ( {item.commit && item.commit.name} - 创建于{item.commit && item.commit.time_ago} + 创建于{txt} ) } diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index 9324cd596..b8d3ef625 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -63,7 +63,11 @@ function Index(props) {
{i.name}
- + { + + + + } {last_commit && last_commit.committer && last_commit.committer.name} 更新于{last_commit && last_commit.time_from_now}
@@ -72,7 +76,7 @@ function Index(props) {
sha - {truncateCommitId(last_commit && last_commit.sha)} + {truncateCommitId(last_commit && last_commit.sha)} @@ -81,7 +85,7 @@ function Index(props) {
{ (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && - + 合并请求 + + 合并请求 } 下载 From 68a5ca938095f0d9fb285cd4d4ba3aaec772f56d Mon Sep 17 00:00:00 2001 From: caishi Date: Thu, 30 Sep 2021 20:08:06 +0800 Subject: [PATCH 2/3] readme --- src/forge/Main/CoderDepot.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 2efec3940..be03e03fb 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -120,12 +120,13 @@ function CoderDepot(props){ setTreeValue(url); getFileInfo(url,branchName); setType("file"); - getReadmeInfo(url,branchName); + // getReadmeInfo(url,branchName); + // setReadme(undefined); }else{ setTreeValue(undefined); getDirInfo(branchName || defaultBranch); setType("dir"); - getReadmeInfo('', branchName || defaultBranch); + // getReadmeInfo('', branchName || defaultBranch); } } },[projectsId,owner,pathname,defaultBranch]) @@ -170,6 +171,7 @@ function CoderDepot(props){ // setReadme(result.data.readme); setEditReadme(false); setHide(true); + getReadmeInfo('', branchName || defaultBranch); } setTimeout(function(){setIsSpin(false);},500); }).catch(error=>{setIsSpin(false);}) @@ -202,16 +204,17 @@ function CoderDepot(props){ setDirInfo(undefined); setFileInfo(en); setType(en.type); + setReadme(undefined); }else{ setFileInfo(undefined); setDirInfo(en); setType("dir"); + getReadmeInfo(path, branchName || defaultBranch); } let c = result.data.last_commit setLastCommit(c && c.commit); setLastCommitAuthor(c && c.committer); setMainFlag(false); - // setReadme(result.data.readme); setReadOnly(true); setReadOnly(!editReadme); setHide(true); From dfd7d9f03f940ceab5e68add10fc95603ac9bf0f Mon Sep 17 00:00:00 2001 From: caishi Date: Thu, 30 Sep 2021 20:40:33 +0800 Subject: [PATCH 3/3] nav style --- src/forge/Branch/branch.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/forge/Branch/branch.scss b/src/forge/Branch/branch.scss index b0f8ca2c9..1b632fa29 100644 --- a/src/forge/Branch/branch.scss +++ b/src/forge/Branch/branch.scss @@ -87,6 +87,13 @@ line-height: 30px; padding:0px 5px; margin-left: 20px!important; + &.ant-menu-item-selected{ + border-color:#466aff!important; + color:#466aff!important; + } + &.ant-menu-item-active{ + border-color:transparent ; + } } } } @@ -109,7 +116,7 @@ color: #333; } &.ant-menu-item-selected{ - border-color:#1890ff!important; + border-color:#466aff!important; } &.ant-menu-item-active{ border-color:transparent ;