readme
This commit is contained in:
parent
0fea52b923
commit
68a5ca9380
|
@ -120,12 +120,13 @@ function CoderDepot(props){
|
|||
setTreeValue(url);
|
||||
getFileInfo(url,branchName);
|
||||
setType("file");
|
||||
getReadmeInfo(url,branchName);
|
||||
// getReadmeInfo(url,branchName);
|
||||
// setReadme(undefined);
|
||||
}else{
|
||||
setTreeValue(undefined);
|
||||
getDirInfo(branchName || defaultBranch);
|
||||
setType("dir");
|
||||
getReadmeInfo('', branchName || defaultBranch);
|
||||
// getReadmeInfo('', branchName || defaultBranch);
|
||||
}
|
||||
}
|
||||
},[projectsId,owner,pathname,defaultBranch])
|
||||
|
@ -170,6 +171,7 @@ function CoderDepot(props){
|
|||
// setReadme(result.data.readme);
|
||||
setEditReadme(false);
|
||||
setHide(true);
|
||||
getReadmeInfo('', branchName || defaultBranch);
|
||||
}
|
||||
setTimeout(function(){setIsSpin(false);},500);
|
||||
}).catch(error=>{setIsSpin(false);})
|
||||
|
@ -202,16 +204,17 @@ function CoderDepot(props){
|
|||
setDirInfo(undefined);
|
||||
setFileInfo(en);
|
||||
setType(en.type);
|
||||
setReadme(undefined);
|
||||
}else{
|
||||
setFileInfo(undefined);
|
||||
setDirInfo(en);
|
||||
setType("dir");
|
||||
getReadmeInfo(path, branchName || defaultBranch);
|
||||
}
|
||||
let c = result.data.last_commit
|
||||
setLastCommit(c && c.commit);
|
||||
setLastCommitAuthor(c && c.committer);
|
||||
setMainFlag(false);
|
||||
// setReadme(result.data.readme);
|
||||
setReadOnly(true);
|
||||
setReadOnly(!editReadme);
|
||||
setHide(true);
|
||||
|
|
Loading…
Reference in New Issue