From 45f188e6f41b173757d65d09d5cd705678394e3f Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 29 Jun 2021 17:29:35 +0800 Subject: [PATCH] =?UTF-8?q?fork=E9=A1=B9=E7=9B=AE=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=AF=E8=A7=81=E6=80=A7=EF=BC=88=E5=85=AC?= =?UTF-8?q?=E6=9C=89=E7=A7=81=E6=9C=89=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Settings/Setting.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index 7e31a98f..cc4bcc03 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -29,14 +29,15 @@ class Setting extends Component { loading:true, project_units:['home',"activity","code"], divertVisible:false, - is_transfering:undefined, + is_transfering:undefined }; } componentDidUpdate=(prevPros)=>{ + if(prevPros && this.props && !this.props.checkIfLogin()){ this.props.history.push("/403") - return + return; } } componentDidMount = () => { @@ -233,6 +234,7 @@ class Setting extends Component { const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state; let mirror = projectDetail && projectDetail.mirror; let type = projectDetail && projectDetail.type; + const forked_from_project_id = this.props && this.props.projectDetail && this.props.projectDetail.forked_from_project_id; return (
- 将仓库设为私有 + 将仓库设为私有 + { forked_from_project_id && (修改仓库的可见性,将会影响到该仓库下所有Fork仓库的可见性)} )}