forked from Gitlink/forgeplus-react
merge:fork项目不能修改可见性(公有私有)
This commit is contained in:
parent
d8b2a20568
commit
a363e62542
|
@ -25,14 +25,17 @@ class Setting extends Component {
|
|||
LanguageList: undefined,
|
||||
private_check: undefined,
|
||||
loading:true,
|
||||
project_units:['home',"activity","code"]
|
||||
project_units:['home',"activity","code"],
|
||||
divertVisible:false,
|
||||
is_transfering:undefined
|
||||
};
|
||||
}
|
||||
|
||||
componentDidUpdate=(prevPros)=>{
|
||||
|
||||
if(prevPros && this.props && !this.props.checkIfLogin()){
|
||||
this.props.history.push("/403")
|
||||
return
|
||||
return;
|
||||
}
|
||||
}
|
||||
componentDidMount = () => {
|
||||
|
@ -193,6 +196,7 @@ class Setting extends Component {
|
|||
const { CategoryList, LanguageList, private_check ,loading } = 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 (
|
||||
<div>
|
||||
<Spin spinning={loading}>
|
||||
|
@ -218,8 +222,10 @@ class Setting extends Component {
|
|||
<Checkbox
|
||||
checked={private_check}
|
||||
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>
|
||||
)}
|
||||
</Form.Item>
|
||||
|
|
Loading…
Reference in New Issue