diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 0b2e68cc..42853440 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -21,7 +21,7 @@ import UpdateDescModal from './sub/UpdateDescModal'; import Nodata from '../Nodata'; /** - * projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不能上传新建文件、下载zip等) + * projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能) */ function CoderDepot(props){ const [ projectDetail , setProjectDetail ]= useState(undefined); @@ -288,7 +288,10 @@ function CoderDepot(props){
- urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求 + { + projectDetail.type !== 2 && + urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求 + } urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务
{ type === "dir" && projectDetail.type !== 2 && @@ -296,12 +299,10 @@ function CoderDepot(props){ } - { - projectDetail.type !== 2 && - - - - } + + + +
{ @@ -350,6 +351,7 @@ function CoderDepot(props){ readOnly={readOnly} onEdit={onEdit} currentBranch={branchName || (projectDetail && projectDetail.default_branch)} + type={projectDetail.type} > } @@ -360,7 +362,7 @@ function CoderDepot(props){ (dirInfo && dirInfo.length === 0) && (fileInfo && fileInfo.length === 0) ? :"" } {/* readme文件显示(显示文件详情时不显示readme文件) */} - { dirInfo && (projectDetail && projectDetail.readme) ? :"" } + { dirInfo && (projectDetail && projectDetail.readme) ? :"" } { diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index a800e76c..2ee43bee 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -166,7 +166,8 @@ class CoderRootFileDetail extends Component { isDeveloper, md, currentBranch, - platform + platform, + type } = this.props; const { language, languages, description } = this.state; let flag = current_user && current_user.login && (isManager || isDeveloper); @@ -185,17 +186,18 @@ class CoderRootFileDetail extends Component { {readOnly ? ( { - detail.direct_download ? - "" - : + !detail.direct_download? this.DownLoadFile(detail.download_url)} className="ml20"> - this.EditFile(false)} className="ml20"> - - - + { + type !==2 && + this.EditFile(false)} className="ml20"> + + + } + :"" } ) : ( @@ -226,18 +228,21 @@ class CoderRootFileDetail extends Component { )} - - - - - - + { + type !==2 && + + + + + + } + )}

diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index bd19f89c..331eb03d 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -95,6 +95,9 @@ & > a:first-child{ border-right: 1px solid #d9d9d9; } + & > a:last-child{ + border-right: none; + } } .infoCount{ display: inline-block; diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index dc6cbe2d..a85e159b 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"}, ]