From 3d3c0b50951ec7639e83580267f0696eb9d4fc2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com>
Date: Thu, 30 Sep 2021 19:42:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=8F=91=E8=A1=8C=E7=89=88=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E6=8E=A7=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Component/Releases.jsx | 5 +++--
src/forge/Main/CoderDepot.jsx | 14 ++++++--------
src/forge/Main/CoderRootCommit.js | 2 +-
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx
index 3ed27867b..260e6bd2d 100644
--- a/src/forge/Component/Releases.jsx
+++ b/src/forge/Component/Releases.jsx
@@ -2,7 +2,7 @@ import React from 'react';
import { AlignTop } from '../Component/layout';
import { Link } from 'react-router-dom';
-function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}){
+function Releases({ owner, projectsId, releaseVersions, distribution }) {
return(
@@ -27,7 +27,8 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
})
:
- 您暂未发布任何版本{baseOperate && projectType !==2 && 创建新版本}
+ 您暂未发布任何版本
+ {distribution && 创建新版本}
}
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx
index 7215e9ab8..2efec3940 100644
--- a/src/forge/Main/CoderDepot.jsx
+++ b/src/forge/Main/CoderDepot.jsx
@@ -74,7 +74,8 @@ function CoderDepot(props){
branchName = returnbar(branchName);
const details = props.projectDetail;
let pathname = props.history.location.pathname;
-
+ //distribution:判断此用户是否可以创建发行版
+ const distribution = details && details.type != 2 && (details.permission === "Admin" || details.permission === "Owner" || details.permission === "Manager");
const { bannerList } = props;
useEffect(()=>{
@@ -139,7 +140,6 @@ function CoderDepot(props){
ref:ref || branchName
}
}).then((result) => {
- console.log('getReadmeInfo', result)
if (result) {
setReadme(result.data);
} else {
@@ -197,7 +197,6 @@ function CoderDepot(props){
}
}).then((result) => {
if (result) {
- console.log(result)
let en = result.data.entries;
if(en.type){
setDirInfo(undefined);
@@ -547,12 +546,11 @@ function CoderDepot(props){
}
diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js
index 8cfa73203..3b41fd372 100644
--- a/src/forge/Main/CoderRootCommit.js
+++ b/src/forge/Main/CoderRootCommit.js
@@ -154,7 +154,7 @@ class CoderRootCommit extends Component{
{item.message}
-
+