diff --git a/src/forge/Branch/Select.jsx b/src/forge/Branch/Select.jsx index b74d558fc..ff3dd829e 100644 --- a/src/forge/Branch/Select.jsx +++ b/src/forge/Branch/Select.jsx @@ -41,6 +41,7 @@ export default (({ projectsId , branch , owner , changeBranch , branchList , tag const menu = (
{ + // if(visible){ + // setKeys("branch"); + // getBranchs(projectsId,owner); + // setIsSpin(true); + // } + // },[visible]) + useEffect(()=>{ if(branchList){ setData(branchList); @@ -68,12 +76,16 @@ function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owne
    { - datas && datas.length>0 ? + datas && datas.length>0 && datas.map((item,key)=>{ return(
  • chooseitem(item.name)}>{item.name}
  • ) - }): + }) + + } + { + datas && datas.length === 0 &&

    暂无{inputValue}{nav === 0 ?"分支":"标签"}~

    }
diff --git a/src/forge/Branch/branch.scss b/src/forge/Branch/branch.scss index 1b632fa29..030b05cd1 100644 --- a/src/forge/Branch/branch.scss +++ b/src/forge/Branch/branch.scss @@ -23,6 +23,7 @@ max-height: 300px; } .OptionsUl{ + min-height: 50px; max-height: 220px; overflow-y: auto; } diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 7f3c66cc7..70d1901eb 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -340,8 +340,8 @@ function CoderDepot(props){ const mdFlag = n && n.substring(n.length-3,n.length) === ".md"; const { current_user } = props; - const baseOper = projectDetail && projectDetail.permission; - const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter"; + const baseOper = current_user && current_user.login && issuesFlag; + const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag; const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin)); return( @@ -400,35 +400,35 @@ function CoderDepot(props){ returnMain={returnMain} getPathUrl={getPathUrl} /> - : -
- - - - 分支 - {projectDetail && projectDetail.branches && projectDetail.branches.total_count} - - - - - - 标签 - {projectDetail && projectDetail.tags && projectDetail.tags.total_count} - - -
+ : +
+ + + + 分支 + {projectDetail && projectDetail.branches && projectDetail.branches.total_count} + + + + + + 标签 + {projectDetail && projectDetail.tags && projectDetail.tags.total_count} + + +
} { - ((baseOperate && projectDetail.type !== 2 && pullsFlag) || (baseOper && issuesFlag)) && + (baseOperate || baseOper) &&
{ - baseOperate && projectDetail.type !== 2 && pullsFlag && + baseOperate && urlLink(`/${owner}/${projectsId}/pulls/new/${branchName || defaultBranch}`)} >+ 合并请求 } { - baseOper && issuesFlag && + baseOper && urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 易修 }
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 3d82db26f..4e1c241b5 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -688,16 +688,12 @@ class Detail extends Component { } > {/* 复制详情 copyetail*/} - {/* () - } - > */} - () } > + {/* 任务详情 */} 提交ID - {truncateCommitId(item.id)} + {truncateCommitId(item.commit && item.commit.sha)} ) } diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js index 65fa7ec24..84ae9b33e 100644 --- a/src/forge/Newfile/UserSubmitComponent.js +++ b/src/forge/Newfile/UserSubmitComponent.js @@ -83,8 +83,9 @@ class UserSubmitComponent extends Component { if (result.data && result.data.name) { this.props.showNotification("文件新建成功!"); if(submitType === "1"){ - const { getTopCount } = this.props; + const { getTopCount , getDetail } = this.props; getTopCount && getTopCount(values.branchname); + getDetail && getDetail(); } let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`; this.props.history.push(url); @@ -147,6 +148,7 @@ class UserSubmitComponent extends Component { const { current_user, filepath, projectDetail , currentBranch } = this.props; const { editor_type } = this.props; let b = currentBranch || branch; + return (
diff --git a/src/forge/Order/Detail.js b/src/forge/Order/Detail.js index b377b6a1d..19ef67c59 100644 --- a/src/forge/Order/Detail.js +++ b/src/forge/Order/Detail.js @@ -123,22 +123,25 @@ class Detail extends Component { //复制 copydetail = () => { const { projectsId, orderId, owner } = this.props.match.params; - const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`; - axios - .post(url, { - project_id: projectsId, - id: orderId, - }) - .then((result) => { - if (result) { - this.props.history.push( - `/${owner}/${projectsId}/issues/${result.data.issue_id}/copyetail` - ); - } - }) - .catch((error) => { - console.log(error); - }); + // const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`; + // axios + // .post(url, { + // project_id: projectsId, + // id: orderId, + // }) + // .then((result) => { + // if (result) { + // this.props.history.push( + // `/${owner}/${projectsId}/issues/${result.data.issue_id}/copyetail` + // ); + // } + // }) + // .catch((error) => { + // console.log(error); + // }); + this.props.history.push( + `/${owner}/${projectsId}/issues/${orderId}/copyetail` + ); }; // 翻页 diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 2c572d594..0858ac527 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -178,7 +178,6 @@ class order_form extends Component { this.setState({ isSpin: false, }); - console.log(error); }); } else { const url = `/${owner}/${projectsId}/issues/${orderId}.json`; diff --git a/src/forge/Team/Sub/SubDetail.jsx b/src/forge/Team/Sub/SubDetail.jsx index 8307a8b14..278fef07e 100644 --- a/src/forge/Team/Sub/SubDetail.jsx +++ b/src/forge/Team/Sub/SubDetail.jsx @@ -50,7 +50,7 @@ export default ((props)=>{ {detail && detail.organization && detail.organization.nickname} - {detail ? detail.name : "新建团队"} + {detail ? detail.nickname : "新建团队"}
{ detail &&