diff --git a/src/forge/Team/Group/GroupForm.jsx b/src/forge/Team/Group/GroupForm.jsx index 1be7bdc0..e27161e0 100644 --- a/src/forge/Team/Group/GroupForm.jsx +++ b/src/forge/Team/Group/GroupForm.jsx @@ -24,21 +24,24 @@ export default Form.create()( const [check_box, setCheckBox] = useState(false); const [switch_box, setSwtichBox] = useState([]); const [onwers, setOnwers] = useState(false); + const [auth, setAuth] = useState(""); const [ descNum , setDescNum ] = useState(0); const [switch_box_code, setSwtichBoxCode] = useState(false); const [switch_box_pull, setSwtichBoxPull] = useState(false); const [switch_box_issue, setSwtichBoxIssue] = useState(false); const [switch_box_release, setSwtichBoxRelease] = useState(false); + const [switch_box_wiki, setSwtichBoxWiki] = useState(false); const { getFieldDecorator, validateFields, setFieldsValue } = form; const { OIdentifier, groupId } = match.params; useEffect(() => { if (GroupDetail) { setOnwers(GroupDetail.authorize === "owner"); + setAuth(GroupDetail.authorize); setCheckBox(GroupDetail.can_create_org_project) setSwtichBox(GroupDetail.units) setFieldsValue({ - ...GroupDetail + ...GroupDetail, }) setDescNum(GroupDetail.description ? GroupDetail.description.length : 0); } @@ -50,6 +53,7 @@ export default Form.create()( setSwtichBoxPull(switch_checked("pulls")) setSwtichBoxIssue(switch_checked("issues")) setSwtichBoxRelease(switch_checked("releases")) + setSwtichBoxWiki(switch_checked("wiki")) } }, [switch_box]) @@ -132,6 +136,11 @@ export default Form.create()( setSwtichBoxRelease(checked) } + function switch_wiki_types(checked, event) { + switch_unit_types(checked, "wiki"); + setSwtichBoxWiki(checked); + } + function cancelEdit(){ if(groupId){ history.push(`/organize/${OIdentifier}/group/${groupId}`); @@ -140,6 +149,9 @@ export default Form.create()( } } + function changeAuth(params) { + setAuth(params.target.value) + } function checkname(rule, value, callback){ if(!value){ @@ -206,31 +218,36 @@ export default Form.create()( '版本库权限:', "authorize", [], - + 读取权限(成员可以查看和克隆团队项目) 写入权限(成员可以查看和推送提交到团队项目) 管理员权限(成员可以拉取和推送到团队项目同时可以添加协作者) , false, 20,onwers ? "hide":"" )} -

允许访问项目单元:

- - - 代码库(查看源码、文件、提交和分支) - - - - 任务(组织 bug 报告、任务和里程碑) - - - - 合并请求(启用合并请求和代码评审) - - - - 版本发布(跟踪项目版本和下载) - - +
+

允许访问项目单元:

+ + + 代码库(查看源码、文件、提交和分支) + + + + 任务(组织 bug 报告、任务和里程碑) + + + + 合并请求(启用合并请求和代码评审) + + + + 版本发布(跟踪项目版本和下载) + + + + wiki(编辑此仓库的相关文档说明) + +
cancelEdit()}>取消 diff --git a/src/forge/Team/Index.scss b/src/forge/Team/Index.scss index a046f99d..11237973 100644 --- a/src/forge/Team/Index.scss +++ b/src/forge/Team/Index.scss @@ -368,5 +368,5 @@ } } .hide{ - display: hidden; + display: none; } \ No newline at end of file