From 01b3ee8d49346ab59517d8b900075a749eb6e6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Wed, 1 Sep 2021 09:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9projects=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 32 ++++--- src/AppConfig.js | 2 +- src/forge/Activity/ActivityItem.js | 6 +- src/forge/Component/Contributors.jsx | 2 +- src/forge/Component/DrawerPanel.jsx | 2 +- src/forge/Component/Releases.jsx | 6 +- src/forge/DevOps/About.jsx | 2 +- src/forge/DevOps/Dispose.jsx | 6 +- src/forge/DevOps/Dispose/List.jsx | 6 +- src/forge/DevOps/Index.jsx | 14 +-- src/forge/DevOps/Infos.jsx | 2 +- src/forge/DevOps/Manage/Params.jsx | 2 +- src/forge/DevOps/Mould.jsx | 2 +- src/forge/DevOps/Structure.jsx | 4 +- src/forge/DevOps/disposePipeline.jsx | 2 +- src/forge/DevOps/opsDetail.jsx | 4 +- src/forge/Index.js | 19 ++-- src/forge/Main/CoderDepot.jsx | 26 +++--- src/forge/Main/CoderDepotCatalogue.jsx | 2 +- src/forge/Main/CoderRootBranch.js | 6 +- src/forge/Main/CoderRootCommit.js | 6 +- src/forge/Main/CoderRootFileDetail.js | 2 +- src/forge/Main/CoderRootIndex.js | 22 ++--- src/forge/Main/CoderRootTag.js | 2 +- src/forge/Main/Detail.js | 82 ++++++++--------- src/forge/Main/DetailTop.js | 8 +- src/forge/Main/Diff.jsx | 2 +- src/forge/Main/Index.js | 2 +- src/forge/Main/IndexItem.js | 2 +- src/forge/Main/sub/DetailBanner.jsx | 22 ++--- src/forge/Merge/Commits.jsx | 4 +- src/forge/Merge/Files.jsx | 2 +- src/forge/Merge/MergeDetail.js | 6 +- src/forge/Merge/MergeItem.js | 10 +- src/forge/Merge/MergeSubmit.js | 2 +- src/forge/Merge/MessageCount.js | 6 +- src/forge/Merge/NewMerge.js | 4 +- src/forge/Merge/merge.js | 2 +- src/forge/Merge/merge_form.js | 6 +- src/forge/Merge/no_data.js | 2 +- src/forge/New/Index.js | 2 +- src/forge/Newfile/UserSubmitComponent.js | 6 +- src/forge/Notice/Notify.jsx | 12 +-- src/forge/Notice/UndoEvent.jsx | 2 +- src/forge/Order/Detail.js | 6 +- src/forge/Order/Milepost.js | 6 +- src/forge/Order/MilepostDetail.js | 4 +- src/forge/Order/Nav.js | 4 +- src/forge/Order/OrderItem.js | 6 +- src/forge/Order/UpdateMilepost.js | 2 +- src/forge/Order/newMilepost.js | 2 +- src/forge/Order/order.js | 2 +- src/forge/Order/order_form.js | 6 +- src/forge/Settings/Branch.js | 2 +- src/forge/Settings/BranchRule.jsx | 2 +- src/forge/Settings/Index.js | 32 +++---- src/forge/Settings/Webhooks/Index.jsx | 6 +- src/forge/Settings/Webhooks/New.jsx | 8 +- src/forge/Team/Group/GroupDetailProject.jsx | 2 +- .../Group/Setting/GroupProjectSetting.jsx | 2 +- src/forge/Team/List.jsx | 4 +- src/forge/Team/ListItem.jsx | 2 +- src/forge/UsersList/fork_users.js | 2 +- src/forge/Version/New.jsx | 6 +- src/forge/Version/version.js | 4 +- src/forge/Wiki/EditWiki.jsx | 2 +- src/forge/Wiki/Index.jsx | 6 +- src/forge/Wiki/Preview.jsx | 4 +- src/forge/Wiki/Welcome/index.jsx | 2 +- src/forge/users/CIList.jsx | 4 +- .../users/GeneralView/ConcentrateProject.jsx | 2 +- src/forge/users/Index.jsx | 91 +++++++++++++++++-- 72 files changed, 336 insertions(+), 248 deletions(-) diff --git a/src/App.js b/src/App.js index ea760e075..6d8397f4f 100644 --- a/src/App.js +++ b/src/App.js @@ -245,7 +245,7 @@ class App extends Component { {/* */} {/* wiki预览 */} - { return () } @@ -253,7 +253,7 @@ class App extends Component { {/*项目*/} { return () @@ -268,15 +268,7 @@ class App extends Component { } }> - {/*项目*/} - { - return () - } - }> - + + {/* { + return () + } + }> + */} + {/* 判断为用户/组织,并进入对应页面 */} { pathType === 'User' ? @@ -334,6 +335,15 @@ class App extends Component { /> } + {/*项目*/} + { + return () + } + }> + {/* 组织 */} - {item.name} + {item.name} {item.trend_type}

: // 如果是任务 item.trend_type === "Issue" ?

- {item.name} + {item.name} {item.trend_type}

: // 如果是合并请求

- {item.name} + {item.name} {item.trend_type}

} diff --git a/src/forge/Component/Contributors.jsx b/src/forge/Component/Contributors.jsx index dd7d40e39..2f67b3ab5 100644 --- a/src/forge/Component/Contributors.jsx +++ b/src/forge/Component/Contributors.jsx @@ -137,7 +137,7 @@ function Contributors({contributors,owner,projectsId}){
贡献者{ contributors && contributors.total_count > 0 && {contributors.total_count}} - 全部 + 全部
setVisibleFunc(false)}> { diff --git a/src/forge/Component/DrawerPanel.jsx b/src/forge/Component/DrawerPanel.jsx index 0e604d593..fa99e6c6f 100644 --- a/src/forge/Component/DrawerPanel.jsx +++ b/src/forge/Component/DrawerPanel.jsx @@ -78,7 +78,7 @@ function DrawerPanel({visible,onClose,branch,owner,projectsId,history, name , li if(dataref.type==="file"){ onClose(); let value = turnbar(branch); - history.push(`/projects/${owner}/${projectsId}/tree/${value}/${dataref.path}`); + history.push(`/${owner}/${projectsId}/tree/${value}/${dataref.path}`); } } diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx index da984543a..bf8caebd4 100644 --- a/src/forge/Component/Releases.jsx +++ b/src/forge/Component/Releases.jsx @@ -11,9 +11,9 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType} { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}} { (releaseVersions && releaseVersions.total_count > 0) || projectType ===2 ? - 全部 + 全部 : - baseOperate && 新建 + baseOperate && 新建 } { @@ -24,7 +24,7 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}

- {item.name} + {item.name} 最新

{item.created_at}

diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index b9524d548..a01271150 100644 --- a/src/forge/DevOps/About.jsx +++ b/src/forge/DevOps/About.jsx @@ -149,7 +149,7 @@ function About(props, ref) { axios.post(url).then(result=>{ setIsSpining(false); if(result && result.data.status === 0){ - props.history.push(`/projects/${owner}/${projectsId}/devops/dispose`); + props.history.push(`/${owner}/${projectsId}/devops/dispose`); // 需要将顶部的open_devops修改 let { changeOpenDevops } = props; changeOpenDevops && changeOpenDevops(true); diff --git a/src/forge/DevOps/Dispose.jsx b/src/forge/DevOps/Dispose.jsx index 2211dbb59..4771816b9 100644 --- a/src/forge/DevOps/Dispose.jsx +++ b/src/forge/DevOps/Dispose.jsx @@ -96,7 +96,7 @@ function Dispose(props){ setVisible(false); if(result && result.data){ props.showNotification("流水线新增成功,请进行工作流配置!"); - props.history.push(`/projects/${owner}/${projectsId}/devops/dispose/${result.data.id}`); + props.history.push(`/${owner}/${projectsId}/devops/dispose/${result.data.id}`); }else{ props.showNotification("流水线新增失败,请稍后再试!"); } @@ -134,12 +134,12 @@ function Dispose(props){ // 模板管理 function toModalManage(){ - props.history.push(`/projects/${owner}/${projectsId}/devops/mould`); + props.history.push(`/${owner}/${projectsId}/devops/mould`); } // 参数管理 function toparameter(){ - props.history.push(`/projects/${owner}/${projectsId}/devops/params`); + props.history.push(`/${owner}/${projectsId}/devops/params`); } const operate = current_user && (permission && permission !== "Reporter"); diff --git a/src/forge/DevOps/Dispose/List.jsx b/src/forge/DevOps/Dispose/List.jsx index 4c077452c..18755e089 100644 --- a/src/forge/DevOps/Dispose/List.jsx +++ b/src/forge/DevOps/Dispose/List.jsx @@ -73,7 +73,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){ render:(value,item)=>{ let v = turnbar(item.branch); return( - {value} + {value} ) } }, @@ -117,7 +117,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){ return( { operate ? - + 编辑 :"" } { operate ? @@ -125,7 +125,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){ 删除 :"" } - 查看运行记录 + 查看运行记录 ) } diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index c3a29a3ec..0878425ab 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -36,37 +36,37 @@ export default ((props)=>{ return( - () } > - () } > - () } > - () } > - () } > - () } > - () } diff --git a/src/forge/DevOps/Infos.jsx b/src/forge/DevOps/Infos.jsx index b5220138d..c51fc87df 100644 --- a/src/forge/DevOps/Infos.jsx +++ b/src/forge/DevOps/Infos.jsx @@ -26,7 +26,7 @@ export default ((props)=>{ return(
- { permission !=="Reporter" && 工作流配置} + { permission !=="Reporter" && 工作流配置}
diff --git a/src/forge/DevOps/Manage/Params.jsx b/src/forge/DevOps/Manage/Params.jsx index 7cb55276e..e63d2f1ef 100644 --- a/src/forge/DevOps/Manage/Params.jsx +++ b/src/forge/DevOps/Manage/Params.jsx @@ -104,7 +104,7 @@ function Params(props){ 工作流 - 参数管理 - 返回 + 返回
diff --git a/src/forge/DevOps/Mould.jsx b/src/forge/DevOps/Mould.jsx index 933299d6b..bf70d760c 100644 --- a/src/forge/DevOps/Mould.jsx +++ b/src/forge/DevOps/Mould.jsx @@ -126,7 +126,7 @@ function Mould(props){
childRef.current = f} ref={childRef} visible={visible} onCancel={()=>setVisible(false)} onOk={onOk}> - 工作流 - 模板管理返回 + 工作流 - 模板管理返回
diff --git a/src/forge/DevOps/Structure.jsx b/src/forge/DevOps/Structure.jsx index 52ac16820..ff98b5a9b 100644 --- a/src/forge/DevOps/Structure.jsx +++ b/src/forge/DevOps/Structure.jsx @@ -198,7 +198,7 @@ function Structure(props,ref){ } function clickRows(event,e){ - props.history.push(`/projects/${owner}/${projectsId}/devops/${e.number}/detail`); + props.history.push(`/${owner}/${projectsId}/devops/${e.number}/detail`); } const column = [ { @@ -290,7 +290,7 @@ function Structure(props,ref){ 构建列表 - 返回 + 返回
diff --git a/src/forge/DevOps/disposePipeline.jsx b/src/forge/DevOps/disposePipeline.jsx index 1da142f64..808ecc004 100644 --- a/src/forge/DevOps/disposePipeline.jsx +++ b/src/forge/DevOps/disposePipeline.jsx @@ -275,7 +275,7 @@ function disposePipeline(props){ ...params }).then(result=>{ if(result){ - props.history.push(`/projects/${owner}/${projectsId}/devops/dispose`); + props.history.push(`/${owner}/${projectsId}/devops/dispose`); } setLoading(false); }).catch(error=>{ diff --git a/src/forge/DevOps/opsDetail.jsx b/src/forge/DevOps/opsDetail.jsx index 6ac3dc449..df265f15e 100644 --- a/src/forge/DevOps/opsDetail.jsx +++ b/src/forge/DevOps/opsDetail.jsx @@ -48,7 +48,7 @@ export default (props) => { axios.post(url).then((result) => { if (result && result.data) { props.showNotification("工作流正在重新构建!"); - props.history.push(`/projects/${owner}/${projectId}/devops/${result.data.number}/detail`); + props.history.push(`/${owner}/${projectId}/devops/${result.data.number}/detail`); } }) .catch((error) => { @@ -87,7 +87,7 @@ export default (props) => { 退出 diff --git a/src/forge/Index.js b/src/forge/Index.js index 3870c0881..7a3ccac5b 100644 --- a/src/forge/Index.js +++ b/src/forge/Index.js @@ -40,13 +40,13 @@ class Index extends Component {
( )} > ( )} @@ -58,17 +58,17 @@ class Index extends Component { )} > ( )} > - ( )} - > + > */} ( @@ -80,9 +80,16 @@ class Index extends Component { ); } } +// export default withRouter( +// ImageLayerOfCommentHOC({ +// imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", +// parentSelector: ".newMain", +// })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index)))) +// ); + export default withRouter( ImageLayerOfCommentHOC({ imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", parentSelector: ".newMain", - })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index)))) + })(Index) ); diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 227aac79f..dd6e8c8a7 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -112,7 +112,7 @@ function CoderDepot(props){ useEffect(()=>{ if (projectsId && owner && defaultBranch){ let b = turnbar(branchName) ; - if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) { + if(pathname.indexOf(`/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) { let url = pathname.split(`/tree/${b}/`)[1]; setTreeValue(url); getFileInfo(url,branchName); @@ -199,7 +199,7 @@ function CoderDepot(props){ // 切换分支或者标签 function changeBranch(value){ let checkvalue = turnbar(value); - let url = `/projects/${owner}/${projectsId}${value && `/tree/${checkvalue}`}${treeValue ? `/${treeValue}`:""}`; + let url = `/${owner}/${projectsId}${value && `/tree/${checkvalue}`}${treeValue ? `/${treeValue}`:""}`; props.history.push(url); } @@ -209,8 +209,8 @@ function CoderDepot(props){ let checkvalue = turnbar(b); return ( - urlLink(`/projects/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件 - urlLink(`/projects/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件 + urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件 + urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件 ) } @@ -229,12 +229,12 @@ function CoderDepot(props){ setTreeValue(undefined); let branch = branchName || defaultBranch; let checkvalue = turnbar(branch); - props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}`); + props.history.push(`/${owner}/${projectsId}/tree/${checkvalue}`); }; // 子目录路径返回链接 function returnUlr(url){ let enBranch = turnbar(branchName); - props.history.push(`/projects/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`); + props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`); } // 点击跳转到子目录 function goToSubRoot(path,type,filename){ @@ -242,7 +242,7 @@ function CoderDepot(props){ let enBranch = branchName || defaultBranch; let checkvalue = turnbar(enBranch); setType(type); - props.history.push(`/projects/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`); + props.history.push(`/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`); } } @@ -254,7 +254,7 @@ function CoderDepot(props){ //点击直接跳转页面 加载一次路由 let enBranch = branchName || defaultBranch; let checkvalue = turnbar(enBranch); - props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}/${path}`); + props.history.push(`/${owner}/${projectsId}/tree/${checkvalue}/${path}`); setType("file"); setEditReadme(true); }; @@ -346,13 +346,13 @@ function CoderDepot(props){ }
- + {projectDetail && projectDetail.branches && projectDetail.branches.total_count}个分支 - + {projectDetail && projectDetail.tags && projectDetail.tags.total_count}个标签 @@ -364,11 +364,11 @@ function CoderDepot(props){ } @@ -396,7 +396,7 @@ function CoderDepot(props){ { hideBtn && changeHide(hide)}> } {lastCommit && lastCommit.time_from_now} - { commitCount ? + { commitCount ? {commitCount}次提交 :"" }
diff --git a/src/forge/Main/CoderDepotCatalogue.jsx b/src/forge/Main/CoderDepotCatalogue.jsx index fae63b3f4..3aa5ccc82 100644 --- a/src/forge/Main/CoderDepotCatalogue.jsx +++ b/src/forge/Main/CoderDepotCatalogue.jsx @@ -17,7 +17,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){ - + {item.commit && item.commit.message} diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js index 8ccc5aa42..3f71d6920 100644 --- a/src/forge/Main/CoderRootBranch.js +++ b/src/forge/Main/CoderRootBranch.js @@ -38,9 +38,9 @@ export default ((props)=>{ return(
  • - {item.name} + {item.name}

    - {item.last_commit && truncateCommitId(item.last_commit.sha)} + {item.last_commit && truncateCommitId(item.last_commit.sha)} {item.last_commit && item.last_commit.message} 最后更新于{item.last_commit && item.last_commit.time_from_now}

    @@ -48,7 +48,7 @@ export default ((props)=>{ { (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && - 创建合并请求 + 创建合并请求 } diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js index c25035cb8..a715fe74e 100644 --- a/src/forge/Main/CoderRootCommit.js +++ b/src/forge/Main/CoderRootCommit.js @@ -101,7 +101,7 @@ class CoderRootCommit extends Component{ // 切换分支 search:tag为根据标签搜索 changeBranch=(value)=>{ const { projectsId , owner } = this.props.match.params; - this.props.history.push(`/projects/${owner}/${projectsId}/commits/branch/${value}`); + this.props.history.push(`/${owner}/${projectsId}/commits/branch/${value}`); } ChangePage=(page)=>{ @@ -141,8 +141,8 @@ class CoderRootCommit extends Component{ return(
    - {truncateCommitId(`${item.sha}`)} - {item.message} + {truncateCommitId(`${item.sha}`)} + {item.message}

    { diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index f86706e4b..fb17098bc 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -149,7 +149,7 @@ class CoderRootFileDetail extends Component { .then((result) => { if (result) { this.props.showNotification("删除成功!"); - this.props.history.push(`/projects/${owner}/${projectsId}`); + this.props.history.push(`/${owner}/${projectsId}`); } }) .catch((error) => { diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js index 84ab94d3f..c6c7b8dad 100644 --- a/src/forge/Main/CoderRootIndex.js +++ b/src/forge/Main/CoderRootIndex.js @@ -87,57 +87,57 @@ class CoderRootIndex extends Component{ {/* 新建文件 */} - () } > - () } > - () } > - () } > - () } > - () } > - () } > - () } > - () } > - () } > - () } diff --git a/src/forge/Main/CoderRootTag.js b/src/forge/Main/CoderRootTag.js index a87386d5c..da1fa96d1 100644 --- a/src/forge/Main/CoderRootTag.js +++ b/src/forge/Main/CoderRootTag.js @@ -49,7 +49,7 @@ export default (( props, { projectDetail }) => { {item.name} - {truncateCommitId(`${item.id}`)} + {truncateCommitId(`${item.id}`)} TAR diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 46d5a72d6..f70f22668 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -141,8 +141,8 @@ const WikiEdit = Loadable({ */ function checkPathname(projectsId, owner, pathname) { let name = ""; - if (pathname && pathname !== `/projects/${owner}/${projectsId}`) { - let url = pathname.split(`/projects/${owner}/${projectsId}`)[1]; + if (pathname && pathname !== `/${owner}/${projectsId}`) { + let url = pathname.split(`/${owner}/${projectsId}`)[1]; if (url.indexOf("/about") > -1) { name = "about" } else if (url.indexOf("/issues") > -1 || url.indexOf("Milepost") > 0) { @@ -404,7 +404,7 @@ class Detail extends Component { const url = `/${owner}/${projectsId}/forks.json`; axios.post(url).then(result => { if (result && result.data.status === 0) { - this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}`); + this.props.history.push(`/${current_user && current_user.login}/${result.data.identifier}`); this.props.showNotification(result.data.message); } this.setState({ @@ -442,7 +442,7 @@ class Detail extends Component { 复刻自 {fork_info.fork_project_user_name} / - {fork_info.fork_form_name} + {fork_info.fork_form_name}

    : "" } @@ -479,7 +479,7 @@ class Detail extends Component { {project.author.name} } / - {projectDetail && projectDetail.name} + {projectDetail && projectDetail.name}
    {projectDetail && projectDetail.private && 私有} @@ -512,7 +512,7 @@ class Detail extends Component { { watchers_count > 0 ? platform ? - + {watchers_count} : @@ -528,7 +528,7 @@ class Detail extends Component { { praises_count > 0 ? platform ? - + {praises_count} : {praises_count} @@ -544,7 +544,7 @@ class Detail extends Component { { forked_count > 0 ? platform ? - + {forked_count} : @@ -583,190 +583,190 @@ class Detail extends Component { {/* 资源 */} - () } > {/* 主页 */} - () } > {/* wiki新增文件 */} - () } > {/* wiki编辑文件 */} - () } > {/* wiki */} - () } > {/* 工作流 */} - () } > {/* 标签列表 */} - () } > {/* 仓库设置 */} - () } > {/* 任务详情 */} - () } > {/*修改里程碑*/} - () } > {/* 新建里程碑 */} - () } > {/*里程碑详情*/} - () } > {/* 里程碑 */} - () } > {/* 里程碑页面新建任务 */} - () } > {/* 新建任务 */} - () } > {/* 修改详情 */} - () } > {/* 复制详情 */} - () } > {/* 动态 */} - () } > {/* 代码Index */} - () } > {/* 新建合并请求 */} - () } > - () } > - () } > - () } > - () } > - () } > - () } > - () } > - () } > {/* 贡献者列表 */} - () } > {/* 代码库----详情页面 */} - () } > - () } > - () } > - () } diff --git a/src/forge/Main/DetailTop.js b/src/forge/Main/DetailTop.js index 260ff1e61..7a0f69988 100644 --- a/src/forge/Main/DetailTop.js +++ b/src/forge/Main/DetailTop.js @@ -12,19 +12,19 @@ class DetailTop extends Component { { platform ? - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.commits_count) || 0}个提交 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.branches_count) || 0}个分支 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.tags_count) || 0}个标签 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.version_releasesed_count) || 0}个发行版 diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index a6b0b49cd..0daa63193 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -59,7 +59,7 @@ export default ({ match , history }) => { {commit && commit.message &&
    {commit.message}
    } - +
  • diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index e58ec0c0e..986b9a84b 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -228,7 +228,7 @@ class Index extends Component { } getoDetail=(login,identifier)=>{ - this.props.history.push(`/projects/${login}/${identifier}`); + this.props.history.push(`/${login}/${identifier}`); } // 选择语言类别 diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 18fd49c68..ec985ecc2 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -35,7 +35,7 @@ class IndexItem extends Component {
    - + {item.author.name}/{item.name} { !item.is_public && 私有 } diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index 3c37a730d..03b55db71 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -10,7 +10,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa if(pathname && pathname==="source"){ let a = list.filter(item=>item.menu_name === "resources"); if(a && a.length === 0){ - history.push(`/projects/${owner}/${projectsId}`); + history.push(`/${owner}/${projectsId}`); } } setMenuName(list); @@ -28,7 +28,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "home" &&
  • - + 主页 @@ -37,7 +37,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "code" &&
  • - + 代码库 @@ -47,7 +47,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa item.menu_name === "issues" &&
  • - + 易修 {projectDetail && projectDetail.issues_count ? {projectDetail.issues_count} : ""} @@ -58,7 +58,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
  • - + 合并请求 {projectDetail && projectDetail.pull_requests_count ? {projectDetail.pull_requests_count} : ""} @@ -68,7 +68,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "wiki" &&
  • - + Wiki @@ -77,7 +77,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "devops" && platform ?
  • - + 工作流(beta版) {projectDetail && projectDetail.ops_count ? {projectDetail.ops_count} : ""} @@ -87,7 +87,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { // item.menu_name === "resources" && //
  • - // + // // // 资源库 // {projectDetail && projectDetail.source_count ? {projectDetail.source_count} :""} @@ -97,7 +97,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "versions" &&
  • - + 里程碑 {projectDetail && projectDetail.versions_count ? {projectDetail.versions_count} :""} @@ -107,7 +107,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "activity" &&
  • - + 动态 @@ -116,7 +116,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "setting" &&
  • - + 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}> 仓库设置 diff --git a/src/forge/Merge/Commits.jsx b/src/forge/Merge/Commits.jsx index 37c254cc9..93e867ae2 100644 --- a/src/forge/Merge/Commits.jsx +++ b/src/forge/Merge/Commits.jsx @@ -16,10 +16,10 @@ function Commits({ commits , projectsId , owner }){
    - {truncateCommitId(`${item.sha}`)} + {truncateCommitId(`${item.sha}`)}

    {item.message}

    - 浏览代码 + 浏览代码
    :提交于{item.time_from_now} diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index 40e617c2a..82a8638c6 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -47,7 +47,7 @@ function Files({data,history,owner,projectsId}){ {item.name} - + +{item.addition} -{item.deletion} diff --git a/src/forge/Merge/MergeDetail.js b/src/forge/Merge/MergeDetail.js index a7e2f33e1..76c31ba0a 100644 --- a/src/forge/Merge/MergeDetail.js +++ b/src/forge/Merge/MergeDetail.js @@ -228,7 +228,7 @@ class MergeDetail extends Component {
    { data && data.issue.user_permission ? - 编辑 + 编辑 : '' }
    @@ -248,8 +248,8 @@ class MergeDetail extends Component {
      -
    • 0 ? "active" : ""}>对话内容
    • -
    • 0 ? "active" : ""}>代码提交
    • +
    • 0 ? "active" : ""}>对话内容
    • +
    • 0 ? "active" : ""}>代码提交
    diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js index 3bc6ed8a2..884c50feb 100644 --- a/src/forge/Merge/MergeItem.js +++ b/src/forge/Merge/MergeItem.js @@ -62,7 +62,7 @@ class MergeItem extends Component {

    @@ -109,7 +109,7 @@ class MergeItem extends Component { item.pull_request_head && {item.is_original @@ -133,7 +133,7 @@ class MergeItem extends Component { item.pull_request_base && {/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */} @@ -175,7 +175,7 @@ class MergeItem extends Component { {item.journals_count ? ( {item.journals_count} @@ -196,7 +196,7 @@ class MergeItem extends Component { >

    diff --git a/src/forge/Merge/MergeSubmit.js b/src/forge/Merge/MergeSubmit.js index 8c80fddf9..d4b42c3b4 100644 --- a/src/forge/Merge/MergeSubmit.js +++ b/src/forge/Merge/MergeSubmit.js @@ -110,7 +110,7 @@ class MergeSubmit extends Component{ title:"SHA", dataIndex: 'sha', render: (text) => ( - {text} + {text} ) },{ title:"备注", diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 427dda900..d1b46b865 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -361,7 +361,7 @@ class MessageCount extends Component {
    {data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {turnbar(data.pull_request && data.pull_request.head)} @@ -376,7 +376,7 @@ class MessageCount extends Component { {data.issue.project_author_name}:{data.pull_request.base} @@ -448,7 +448,7 @@ class MessageCount extends Component { type="green" ghost className="ml20" - onClick={()=>{this.props.history.push(`/projects/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}} + onClick={()=>{this.props.history.push(`/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}} > 编辑 diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js index 97df7fb1b..956be0006 100644 --- a/src/forge/Merge/NewMerge.js +++ b/src/forge/Merge/NewMerge.js @@ -186,7 +186,7 @@ class NewMerge extends Component { // this.ischeckmerge(); let { id ,merge , pull } = this.state; if(type==="pull"){ - this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new/${pull}`) + this.props.history.push(`/${owner}/${projectsId}/pulls/new/${pull}`) this.compareProject(id,value,merge); }else{ this.compareProject(id,pull,value); @@ -208,7 +208,7 @@ class NewMerge extends Component { merge_user_login: is_fork_id ? projects_names[0].project_user_login : undefined } }) - this.props.history.push(`/projects/${login}/${identifier}/pulls/new`); + this.props.history.push(`/${login}/${identifier}/pulls/new`); this.newMergelist(login,identifier); }; diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js index 2b72cbee6..03b3b74b2 100644 --- a/src/forge/Merge/merge.js +++ b/src/forge/Merge/merge.js @@ -212,7 +212,7 @@ class merge extends Component { checkOperation() { const { projectsId,owner } = this.props.match.params; - this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new`); + this.props.history.push(`/${owner}/${projectsId}/pulls/new`); } render() { const { projectsId , owner } = this.props.match.params; diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js index 3481cc8f0..9332d9b85 100644 --- a/src/forge/Merge/merge_form.js +++ b/src/forge/Merge/merge_form.js @@ -165,7 +165,7 @@ class MergeForm extends Component { this.setState({ isSpin: false, }); - this.props.history.push(`/projects/${owner}/${projectsId}/pulls`); + this.props.history.push(`/${owner}/${projectsId}/pulls`); const { getDetail } = this.props; getDetail && getDetail(); } else { @@ -195,7 +195,7 @@ class MergeForm extends Component { isSpin: false, }); this.props.history.push( - `/projects/${owner}/${projectsId}/pulls/${mergeId}/Messagecount` + `/${owner}/${projectsId}/pulls/${mergeId}/Messagecount` ); } else { this.setState({ @@ -287,7 +287,7 @@ class MergeForm extends Component { type="default" className="ml30" onClick={()=>{ - this.props.history.push(merge_type === "new" ? `/projects/${owner}/${projectsId}/pulls` : `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`) + this.props.history.push(merge_type === "new" ? `/${owner}/${projectsId}/pulls` : `/${owner}/${projectsId}/pulls/${mergeId}/detail`) }} > 取消 diff --git a/src/forge/Merge/no_data.js b/src/forge/Merge/no_data.js index 8ad550abe..d5584797f 100644 --- a/src/forge/Merge/no_data.js +++ b/src/forge/Merge/no_data.js @@ -12,7 +12,7 @@ class Nodata extends Component{

    欢迎使用合并请求!

    - 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求 + 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求
    diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js index 18f2aa9a3..208d03672 100644 --- a/src/forge/New/Index.js +++ b/src/forge/New/Index.js @@ -213,7 +213,7 @@ class Index extends Component { isSpin: false }) projectsType && projectsType !== "mirror" && this.props.showNotification(`托管项目创建成功!`); - this.props.history.push(`/projects/${result.data.login}/${result.data.identifier}`); + this.props.history.push(`/${result.data.login}/${result.data.identifier}`); } }).catch((error) => { this.setState({ diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js index 25504f64a..65fa7ec24 100644 --- a/src/forge/Newfile/UserSubmitComponent.js +++ b/src/forge/Newfile/UserSubmitComponent.js @@ -86,7 +86,7 @@ class UserSubmitComponent extends Component { const { getTopCount } = this.props; getTopCount && getTopCount(values.branchname); } - let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`; + let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`; this.props.history.push(url); } }) @@ -123,7 +123,7 @@ class UserSubmitComponent extends Component { this.setState({ isSpin: false }); if (result.data && result.data.status === 1) { let b = currentBranch || branch; - let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`; + let url = `/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`; this.props.history.push(url); this.props.showNotification("文件修改成功!"); } @@ -248,7 +248,7 @@ class UserSubmitComponent extends Component {
    @@ -204,7 +204,7 @@ class Milepost extends Component {
    - {item.name} + {item.name}
  • @@ -228,7 +228,7 @@ class Milepost extends Component {
    - 编辑 + 编辑
    diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js index 305267507..d77675c8b 100644 --- a/src/forge/Order/MilepostDetail.js +++ b/src/forge/Order/MilepostDetail.js @@ -238,8 +238,8 @@ class MilepostDetail extends Component { {data && data.percent && data.percent.toFixed(2)}%完成
    - 编辑里程碑 - 创建易修 + 编辑里程碑 + 创建易修
    diff --git a/src/forge/Order/Nav.js b/src/forge/Order/Nav.js index 93fbc1011..b5d196d61 100644 --- a/src/forge/Order/Nav.js +++ b/src/forge/Order/Nav.js @@ -7,8 +7,8 @@ class Nav extends Component{ const { projectsId , owner } = this.props.match.params; return(

    - 标签 - 里程碑 + 标签 + 里程碑

    ) } diff --git a/src/forge/Order/OrderItem.js b/src/forge/Order/OrderItem.js index 1369b5976..2f9ac1852 100644 --- a/src/forge/Order/OrderItem.js +++ b/src/forge/Order/OrderItem.js @@ -51,7 +51,7 @@ class OrderItem extends Component { {current_user && current_user.login && checkbox}

    - {item.name} + {item.name} {TagInfo(item.priority,"mr10")}

    @@ -88,12 +88,12 @@ class OrderItem extends Component {

  • {item.done_ratio || "--"}
  • - {item.journals_count} + {item.journals_count} { user_admin_or_member ?
    - +
    document.getElementById("hoverBox")} title={'您确定要删除当前易修吗?'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}> diff --git a/src/forge/Order/UpdateMilepost.js b/src/forge/Order/UpdateMilepost.js index 88a730331..c4f386575 100644 --- a/src/forge/Order/UpdateMilepost.js +++ b/src/forge/Order/UpdateMilepost.js @@ -79,7 +79,7 @@ class UpdateMilepost extends Component { }).then(result => { if (result) { this.setState({ isSpin: false }) - this.props.history.push(`/projects/${owner}/${projectsId}/milestones`); + this.props.history.push(`/${owner}/${projectsId}/milestones`); } diff --git a/src/forge/Order/newMilepost.js b/src/forge/Order/newMilepost.js index b95132122..b7d1102dd 100644 --- a/src/forge/Order/newMilepost.js +++ b/src/forge/Order/newMilepost.js @@ -63,7 +63,7 @@ class NewMilepost extends Component { }).then(result => { if (result) { this.setState({ isSpin: false }) - this.props.history.push(`/projects/${owner}/${projectsId}/milestones`); + this.props.history.push(`/${owner}/${projectsId}/milestones`); const { getDetail } = this.props; getDetail && getDetail(); } diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 1202f41fc..82cc40fea 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -351,7 +351,7 @@ class order extends Component { if(data && data.user_admin_or_member){ const { projectsId , owner } = this.props.match.params; return( - + + 创建易修 ) diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index b6f065b21..22b8155ba 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -165,7 +165,7 @@ class order_form extends Component { }).then((result) => { if (result && result.data.id) { this.props.showNotification("任务创建成功!"); - this.props.history.push(`/projects/${owner}/${projectsId}/issues/${result.data.id}/detail`); + this.props.history.push(`/${owner}/${projectsId}/issues/${result.data.id}/detail`); this.setState({ description: "", isSpin: false, @@ -191,7 +191,7 @@ class order_form extends Component { ...values, }).then((result) => { if (result) { - this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`); + this.props.history.push(`/${owner}/${projectsId}/issues/${orderId}/detail`); this.props.showNotification("任务更新成功!"); const { getDetail } = this.props; getDetail && getDetail(); @@ -371,7 +371,7 @@ class order_form extends Component { type="default" className="ml30" onClick={()=> - this.props.history.push(form_type === "new" ? `/projects/${owner}/${projectsId || orderId}/issues` : `/projects/${owner}/${projectsId}/issues/${orderId}/detail`)} + this.props.history.push(form_type === "new" ? `/${owner}/${projectsId || orderId}/issues` : `/${owner}/${projectsId}/issues/${orderId}/detail`)} > 取消 diff --git a/src/forge/Settings/Branch.js b/src/forge/Settings/Branch.js index d345f0fc1..1570e6a6f 100644 --- a/src/forge/Settings/Branch.js +++ b/src/forge/Settings/Branch.js @@ -88,7 +88,7 @@ export default ((props)=>{ // 跳转 function settingRule(protectBranch){ - props.history.push(`/projects/${owner}/${projectsId}/setting/branch/${protectBranch}`); + props.history.push(`/${owner}/${projectsId}/setting/branch/${protectBranch}`); } // 翻页 diff --git a/src/forge/Settings/BranchRule.jsx b/src/forge/Settings/BranchRule.jsx index d15ecd00d..90b00abe8 100644 --- a/src/forge/Settings/BranchRule.jsx +++ b/src/forge/Settings/BranchRule.jsx @@ -290,7 +290,7 @@ export default Form.create()( { - history.push(`/projects/${owner}/${projectsId}/setting/branch`); + history.push(`/${owner}/${projectsId}/setting/branch`); }} > 取消 diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js index c8fd2f1ef..a610080d0 100644 --- a/src/forge/Settings/Index.js +++ b/src/forge/Settings/Index.js @@ -49,14 +49,14 @@ class Index extends Component { const { projectsId , owner } = this.props.match.params; const { pathname } = this.props.history.location; - const flag = pathname === `/projects/${owner}/${projectsId}/setting`; + const flag = pathname === `/${owner}/${projectsId}/setting`; return (
    • - + 基本设置

      @@ -67,7 +67,7 @@ class Index extends Component { } >

      - + 协作者管理 @@ -79,7 +79,7 @@ class Index extends Component { } >

      - + Webhooks @@ -91,7 +91,7 @@ class Index extends Component { } >

      - + 分支设置 @@ -101,7 +101,7 @@ class Index extends Component { className={pathname.indexOf("setting/tags") > -1 ? "active" : ""} >

      - + 项目标签 @@ -127,64 +127,64 @@ class Index extends Component { {/* webhooks */} ( )} > ( )} > ( )} > {/* 协作者 */} ( )} > {/* 修改仓库信息 */} ( )} > ( )} > ( )} > ( )} > ( )} > {/* 修改仓库信息 */} ( )} diff --git a/src/forge/Settings/Webhooks/Index.jsx b/src/forge/Settings/Webhooks/Index.jsx index c69922435..f3f5e26a3 100644 --- a/src/forge/Settings/Webhooks/Index.jsx +++ b/src/forge/Settings/Webhooks/Index.jsx @@ -62,7 +62,7 @@ function Index(props) { if(total >= 20){ return props.showNotification("webhooks数量已到上限!请删除暂不使用的webhooks以进行添加操作"); } - props.history.push(`/projects/${owner}/${projectsId}/setting/webhooks/new`) + props.history.push(`/${owner}/${projectsId}/setting/webhooks/new`) } return( @@ -90,9 +90,9 @@ function Index(props) { return( - {i.url} + {i.url} - + diff --git a/src/forge/Settings/Webhooks/New.jsx b/src/forge/Settings/Webhooks/New.jsx index 0dedaa831..18b64b989 100644 --- a/src/forge/Settings/Webhooks/New.jsx +++ b/src/forge/Settings/Webhooks/New.jsx @@ -111,7 +111,7 @@ function New({ form , match , showNotification , history }) { }).then(result=>{ if(result){ showNotification("webhook更新成功!"); - history.push(`/projects/${owner}/${projectsId}/setting/webhooks`); + history.push(`/${owner}/${projectsId}/setting/webhooks`); } }).catch(error=>{}) }else{ @@ -125,7 +125,7 @@ function New({ form , match , showNotification , history }) { }).then(result=>{ if(result && result.data && result.data.id){ showNotification("webhook新建成功!"); - history.push(`/projects/${owner}/${projectsId}/setting/webhooks`); + history.push(`/${owner}/${projectsId}/setting/webhooks`); } }).catch(error=>{}) } @@ -157,7 +157,7 @@ function New({ form , match , showNotification , history }) { axios.delete(url).then(result=>{ if(result){ showNotification("webhook删除成功!"); - history.push(`/projects/${owner}/${projectsId}/setting/webhooks`); + history.push(`/${owner}/${projectsId}/setting/webhooks`); } }).catch(error=>{}) } @@ -180,7 +180,7 @@ function New({ form , match , showNotification , history }) { subTitle={`删除后未来事件将不会推送至此Webhook地址:${data && data.url}`} /> - Webhooks + Webhooks {id ? "更新" : "添加"}Webhook diff --git a/src/forge/Team/Group/GroupDetailProject.jsx b/src/forge/Team/Group/GroupDetailProject.jsx index 0c843f0af..20284c9fd 100644 --- a/src/forge/Team/Group/GroupDetailProject.jsx +++ b/src/forge/Team/Group/GroupDetailProject.jsx @@ -31,7 +31,7 @@ export default (({projects}) => { return (

      - {item.project.name} + {item.project.name}
      ) }) diff --git a/src/forge/Team/Group/Setting/GroupProjectSetting.jsx b/src/forge/Team/Group/Setting/GroupProjectSetting.jsx index 1762a8648..9a4f39582 100644 --- a/src/forge/Team/Group/Setting/GroupProjectSetting.jsx +++ b/src/forge/Team/Group/Setting/GroupProjectSetting.jsx @@ -180,7 +180,7 @@ function GroupProjectSetting(props) { } > {item.project.owner_name}/{item.project.name}} + title={{item.project.owner_name}/{item.project.name}} /> )} diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx index 8cf96587a..7753aa5e9 100644 --- a/src/forge/Team/List.jsx +++ b/src/forge/Team/List.jsx @@ -61,8 +61,8 @@ function List(props){ ) const menu_new=( - 新建托管项目 - 新建镜像项目 + 新建托管项目 + 新建镜像项目 ) diff --git a/src/forge/Team/ListItem.jsx b/src/forge/Team/ListItem.jsx index 3c2cf3f41..a908f80bb 100644 --- a/src/forge/Team/ListItem.jsx +++ b/src/forge/Team/ListItem.jsx @@ -7,7 +7,7 @@ function ListItem({item,key,OIdentifier}) {

      - {item.name} + {item.name} { item.forked_from_project_id && } { item.type && item.type !== 0 ? diff --git a/src/forge/UsersList/fork_users.js b/src/forge/UsersList/fork_users.js index 1e4c3e940..23cd5bead 100644 --- a/src/forge/UsersList/fork_users.js +++ b/src/forge/UsersList/fork_users.js @@ -96,7 +96,7 @@ class ForkUsers extends Component {

      { if (result) { showNotification("版本修改成功!"); - history.push(`/projects/${owner}/${projectsId}/releases`); + history.push(`/${owner}/${projectsId}/releases`); } }); } else { @@ -116,7 +116,7 @@ export default Form.create()( .then(result => { if (result) { showNotification("版本发布成功!"); - history.push(`/projects/${owner}/${projectsId}/releases`); + history.push(`/${owner}/${projectsId}/releases`); } }); } @@ -233,7 +233,7 @@ export default Form.create()(
      diff --git a/src/forge/Wiki/EditWiki.jsx b/src/forge/Wiki/EditWiki.jsx index ae30b4463..a7b4911d1 100644 --- a/src/forge/Wiki/EditWiki.jsx +++ b/src/forge/Wiki/EditWiki.jsx @@ -126,7 +126,7 @@ export default Form.create()(({ form, history, showNotification, projectDetail, } function goBack() { - history.push(`/projects/${owner}/${projectsId}/wiki`); + history.push(`/${owner}/${projectsId}/wiki`); } function changeModal(e) { diff --git a/src/forge/Wiki/Index.jsx b/src/forge/Wiki/Index.jsx index 417f79671..f15b19686 100644 --- a/src/forge/Wiki/Index.jsx +++ b/src/forge/Wiki/Index.jsx @@ -107,15 +107,15 @@ export default (props) => { } function addFile() { - history.push(`/projects/${owner}/${projectsId}/wiki/add`); + history.push(`/${owner}/${projectsId}/wiki/add`); } function goEdit() { - history.push(`/projects/${owner}/${projectsId}/wiki/edit/${encodeURI(checkItem.name)}`); + history.push(`/${owner}/${projectsId}/wiki/edit/${encodeURI(checkItem.name)}`); } function preview() { - window.open(`/projects/${owner}/${projectsId}/wiki/preview/${encodeURI(project.name)}/${project.id}`); + window.open(`/${owner}/${projectsId}/wiki/preview/${encodeURI(project.name)}/${project.id}`); } // 支持 Markdown,Html,Pdf格式文件 diff --git a/src/forge/Wiki/Preview.jsx b/src/forge/Wiki/Preview.jsx index e7c6a6236..93ebe2e8a 100644 --- a/src/forge/Wiki/Preview.jsx +++ b/src/forge/Wiki/Preview.jsx @@ -61,11 +61,11 @@ export default (props) => { }, [project, checkItem]); function goEdit() { - history.push(`/projects/${owner}/${projectsId}/wiki/edit/${checkItem.name}`); + history.push(`/${owner}/${projectsId}/wiki/edit/${checkItem.name}`); } function goBack() { - history.push(`/projects/${owner}/${projectsId}/wiki`); + history.push(`/${owner}/${projectsId}/wiki`); } // 支持 Markdown,Html,Pdf格式文件 diff --git a/src/forge/Wiki/Welcome/index.jsx b/src/forge/Wiki/Welcome/index.jsx index 78cd34e45..fc3af6efc 100644 --- a/src/forge/Wiki/Welcome/index.jsx +++ b/src/forge/Wiki/Welcome/index.jsx @@ -27,7 +27,7 @@ export default ({ project, isManager, history, showNotification, match, reloadLi // } function addFile() { - history.push(`/projects/${owner}/${projectsId}/wiki/add`); + history.push(`/${owner}/${projectsId}/wiki/add`); } return ( diff --git a/src/forge/users/CIList.jsx b/src/forge/users/CIList.jsx index a4e0331ca..9953fa7b4 100644 --- a/src/forge/users/CIList.jsx +++ b/src/forge/users/CIList.jsx @@ -62,7 +62,7 @@ function CIList(props){ return(
    • - {item.name} + {item.name} { item.open_devops ? 已激活 : @@ -79,7 +79,7 @@ function CIList(props){ : - + }
    • ) diff --git a/src/forge/users/GeneralView/ConcentrateProject.jsx b/src/forge/users/GeneralView/ConcentrateProject.jsx index 05030b64e..96b3d55ae 100644 --- a/src/forge/users/GeneralView/ConcentrateProject.jsx +++ b/src/forge/users/GeneralView/ConcentrateProject.jsx @@ -59,7 +59,7 @@ function ConcentrateProject({userLogin,current}) { list.map((i,k)=>{ return(
    • - {i.name} + {i.name}

      {i.description}

      { i.category && {i.category.name} } diff --git a/src/forge/users/Index.jsx b/src/forge/users/Index.jsx index c02820c5d..8737e5caa 100644 --- a/src/forge/users/Index.jsx +++ b/src/forge/users/Index.jsx @@ -10,17 +10,88 @@ const Infos = Loadable({ loader: () => import("./Infos"), loading: Loading, }); +//forge项目 +const Projects = Loadable({ + loader: () => import('../Index'), + loading: Loading, +}) export default withRouter( - (CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{ - return( - - ( - - )} - > - + (CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props) => { + return ( + + + ( + + )} + > + + ( + + )} + > + + ( + + )} + > + + ( + + )} + > + + ( + + )} + > + + ( + + )} + > + + ( + + )} + > + + ( + + )} + > + + { + return () + } + }> + + + ( + + )} + > + ) })))) ) \ No newline at end of file