forked from Gitlink/forgeplus-react
代码库:从文件详情切换到文件列表时,上传文件和新建文件的按钮没有显示
This commit is contained in:
parent
5eaebd4e42
commit
cb95e50a82
|
@ -79,9 +79,11 @@ function CoderDepot(props){
|
||||||
let url = pathname.split(`/tree/${branchName}/`)[1];
|
let url = pathname.split(`/tree/${branchName}/`)[1];
|
||||||
setTreeValue(url);
|
setTreeValue(url);
|
||||||
getFileInfo(url,branchName);
|
getFileInfo(url,branchName);
|
||||||
|
setType("file");
|
||||||
}else{
|
}else{
|
||||||
setTreeValue(undefined);
|
setTreeValue(undefined);
|
||||||
getDirInfo(branchName || defaultBranch);
|
getDirInfo(branchName || defaultBranch);
|
||||||
|
setType("dir");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},[projectsId,owner,pathname,defaultBranch])
|
},[projectsId,owner,pathname,defaultBranch])
|
||||||
|
@ -244,7 +246,6 @@ function CoderDepot(props){
|
||||||
|
|
||||||
const { current_user } = props;
|
const { current_user } = props;
|
||||||
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin));
|
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin));
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<WhiteBack>
|
<WhiteBack>
|
||||||
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
|
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
|
||||||
|
|
Loading…
Reference in New Issue