fork项目不能修改可见性(公有私有)
This commit is contained in:
parent
4b832f40c0
commit
45f188e6f4
|
@ -29,14 +29,15 @@ class Setting extends Component {
|
||||||
loading:true,
|
loading:true,
|
||||||
project_units:['home',"activity","code"],
|
project_units:['home',"activity","code"],
|
||||||
divertVisible:false,
|
divertVisible:false,
|
||||||
is_transfering:undefined,
|
is_transfering:undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate=(prevPros)=>{
|
componentDidUpdate=(prevPros)=>{
|
||||||
|
|
||||||
if(prevPros && this.props && !this.props.checkIfLogin()){
|
if(prevPros && this.props && !this.props.checkIfLogin()){
|
||||||
this.props.history.push("/403")
|
this.props.history.push("/403")
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
|
@ -233,6 +234,7 @@ class Setting extends Component {
|
||||||
const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state;
|
const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state;
|
||||||
let mirror = projectDetail && projectDetail.mirror;
|
let mirror = projectDetail && projectDetail.mirror;
|
||||||
let type = projectDetail && projectDetail.type;
|
let type = projectDetail && projectDetail.type;
|
||||||
|
const forked_from_project_id = this.props && this.props.projectDetail && this.props.projectDetail.forked_from_project_id;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<DivertModal
|
<DivertModal
|
||||||
|
@ -265,8 +267,10 @@ class Setting extends Component {
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={private_check}
|
checked={private_check}
|
||||||
onChange={this.changePrivate}
|
onChange={this.changePrivate}
|
||||||
|
disabled={forked_from_project_id}
|
||||||
>
|
>
|
||||||
将仓库设为私有
|
<span className="color-grey-9">将仓库设为私有</span>
|
||||||
|
{ forked_from_project_id && <span className="color-grey-6">(修改仓库的可见性,将会影响到该仓库下所有Fork仓库的可见性)</span>}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
Loading…
Reference in New Issue