From 961587921ac43d82a47bac7e368c428c88656ea1 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 8 Apr 2021 10:07:55 +0800 Subject: [PATCH] =?UTF-8?q?projectDetail.type:0=E6=98=AF=E6=89=98=E7=AE=A1?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=EF=BC=8C1=E6=98=AF=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=EF=BC=8C2=E6=98=AF=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E9=A1=B9=E7=9B=AE(=E4=B8=BA2=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=8A=E4=BC=A0=E6=96=B0=E5=BB=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E3=80=81=E4=B8=8B=E8=BD=BDzip=E7=AD=89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 15 ++++++++++----- src/forge/Settings/Setting.js | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 14e46ff3..0b2e68cc 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -20,7 +20,9 @@ import DrawerPanel from '../Component/DrawerPanel'; import UpdateDescModal from './sub/UpdateDescModal'; import Nodata from '../Nodata'; - +/** + * projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不能上传新建文件、下载zip等) + */ function CoderDepot(props){ const [ projectDetail , setProjectDetail ]= useState(undefined); const [ treeValue , setTreeValue ] = useState(undefined); @@ -289,14 +291,17 @@ function CoderDepot(props){ urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求 urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务 - { type === "dir" && + { type === "dir" && projectDetail.type !== 2 && } - - - + { + projectDetail.type !== 2 && + + + + } { diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index a85e159b..dc6cbe2d 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -13,7 +13,7 @@ const menu = [ {name:"易修 (Issue)",index:"issues"}, {name:"合并请求",index:"pulls"}, {name:"工作流(beta版)",index:"devops"}, - {name:"资源库",index:"resources"}, + // {name:"资源库",index:"resources"}, {name:"里程碑",index:"versions"}, {name:"动态",index:"activity"}, ]