forked from Gitlink/forgeplus-react
Merge pull request '1201上线' (#594) from Eeeros/forgeplus-react:gitlink_server into gitlink_server
1
This commit is contained in:
commit
4b9aab156e
File diff suppressed because it is too large
Load Diff
|
@ -62,9 +62,11 @@ function CoderDepot(props){
|
|||
let branchName = props.match.params.branchName;
|
||||
branchName = returnbar(branchName);
|
||||
let pathname = props.history.location.pathname;
|
||||
let search = props.history.location.search
|
||||
const { platform , mirror_status , bannerList , projectDetail } = props ;
|
||||
//distribution:判断此用户是否可以创建发行版
|
||||
const distribution = projectDetail && projectDetail.type ===0 && ( projectDetail.permission && projectDetail.permission !== "Reporter");
|
||||
|
||||
useEffect(()=>{
|
||||
if(bannerList && bannerList.length>0){
|
||||
let a = bannerList.filter(i=>i.menu_name === "pulls");
|
||||
|
@ -138,6 +140,15 @@ function CoderDepot(props){
|
|||
}
|
||||
},[projectsId,owner,pathname,defaultBranch,mirror_status])
|
||||
|
||||
// 编辑完回来重新获取
|
||||
useEffect(()=>{
|
||||
if (projectsId && owner && defaultBranch && mirror_status===0 && !search){
|
||||
let b = turnbar(branchName) ;
|
||||
let url = pathname.split(`/tree/${b}/`)[1];
|
||||
getFileInfo(url,branchName);
|
||||
}
|
||||
},[search])
|
||||
|
||||
useEffect(()=>{
|
||||
if(platform && mirror_status===0){
|
||||
setReadOnly(props.history.location.search.indexOf('edit') !== -1);
|
||||
|
|
|
@ -54,7 +54,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId , platform
|
|||
</span>
|
||||
<span title="init project">
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>
|
||||
{getEmoji(getMessage(item.commit && item.commit.message))}
|
||||
{getEmoji(getMessage(item.commit && item.commit.message.split('\n')[0]))}
|
||||
</Link>
|
||||
</span>
|
||||
<span title={item.commit && item.commit.created_at}>{item.commit && item.commit.time_from_now}</span>
|
||||
|
|
|
@ -145,7 +145,7 @@ class UserSubmitComponent extends Component {
|
|||
let b = currentBranch || branch;
|
||||
let src = `/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}${detail.path ? `/${returnbar(detail.path)}` : ""}`;
|
||||
this.props.history.push(src);
|
||||
this.props.showNotification("文件修改成功!");
|
||||
this.props.showNotification("文件修改成功! ");
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
cursor: pointer;
|
||||
/* 行内样式 */
|
||||
max-width: 100% !important;
|
||||
height: auto !important;
|
||||
/* height: auto !important; */
|
||||
}
|
||||
.markdown-body pre ol.linenums,.markdown-body pre ul.linenums{
|
||||
padding-left: 0px;
|
||||
|
@ -57,7 +57,7 @@
|
|||
.markdown-body video{
|
||||
/* 行内样式 */
|
||||
max-width: 100% !important;
|
||||
height: auto !important;
|
||||
/* height: auto !important; */
|
||||
}
|
||||
|
||||
ol,
|
||||
|
|
Loading…
Reference in New Issue