From 0d8012c73cf628e1dcf88c7c91dbd1a25433e341 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 5 Jun 2020 11:46:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E9=80=89=E6=8B=A9img?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderRootDirectory.js | 16 +++++------ src/forge/Main/CoderRootFileDetail.js | 41 ++++++++------------------- src/forge/Main/Detail.js | 14 ++------- 3 files changed, 22 insertions(+), 49 deletions(-) diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index b71f215a4..fd5f3ddc9 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -466,20 +466,18 @@ class CoderRootDirectory extends Component { {subFileType && (isManager || isDeveloper) && (
- + 上传文件 + - +
)} diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index 54a13b201..be9cd4df9 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -78,28 +78,7 @@ class CoderRootFileDetail extends Component { }); }; - // // 确认修改文件 - // UpdateFile=()=>{ - // const { branch , detail}= this.props; - // const { projectsId } = this.props.match.params; - // const { value } = this.state; - // const url =`/repositories/${projectsId}/update_file.json`; - // axios.put(url,{ - // filepath:detail.path, - // branch, - // content:value, - // sha:detail.sha, - // }).then(result=>{ - // if(result){ - // this.props.showNotification("修改成功!"); - // this.setState({ - // readOnly:true - // }) - // } - // }).catch(error=>{ - // console.log(error); - // }) - // } + updateCode = (value) => { this.setState({ value, @@ -197,8 +176,6 @@ class CoderRootFileDetail extends Component { > 取 消 - {/* */} )} @@ -215,14 +192,20 @@ class CoderRootFileDetail extends Component { )} + { + detail.image_type && detail.direct_download ? +
+ + 下载原始文件 + +
:"" + }

- {detail.direct_download ? ( -
- - 下载原始文件 - + {detail.image_type && detail.direct_download ? ( +
+
) : ( @@ -354,7 +355,7 @@ class Detail extends Component { : "" } { - projectDetail && projectDetail.type && projectDetail.type === 2 ? + projectDetail && checkLogin && projectDetail.type && projectDetail.type === 2 ? :"" @@ -383,7 +384,6 @@ class Detail extends Component { {praises_count} - {/* {praises_count} */} @@ -391,7 +391,6 @@ class Detail extends Component { {forked_count} - {/* {forked_count} */}
@@ -415,13 +414,6 @@ class Detail extends Component { { projectDetail && projectDetail.pull_requests_count ? {projectDetail.issues_count} : "" } - {/*
  • -1 ? "active" : ""}> - - 版本发布 - {projectDetail && projectDetail.version_releases_count && {projectDetail.version_releases_count}} - -
  • */} -
  • -1 || url.indexOf("meilpost") > -1) ? "active" : ""}> 里程碑