diff --git a/src/App.js b/src/App.js index aae03b9d..af5532ad 100644 --- a/src/App.js +++ b/src/App.js @@ -105,7 +105,7 @@ class App extends Component { occupation: 0, mygetHelmetapi: null, pathType: null, - pathName: '', + pathName: null, } } @@ -118,7 +118,7 @@ class App extends Component { this.unlisten = this.props.history.listen((location) => { let newPathname = location.pathname.split('/')[1]; if (this.state.pathName !== newPathname) { - this.setState({ pathType: '' }); + // this.setState({ pathType: '' }); newPathname && this.getPathnameType(newPathname); } }); @@ -175,7 +175,6 @@ class App extends Component { const msg = `${event.type}: ${event.message}`; }); - } componentWillUnmount() { @@ -252,7 +251,7 @@ class App extends Component { }; render() { - const { mygetHelmetapi, pathType } = this.state; + const { mygetHelmetapi, pathType} = this.state; let personal = mygetHelmetapi && mygetHelmetapi.personal; return ( @@ -309,15 +308,22 @@ class App extends Component { ( - personal && personal.length > 0 ? - - : ) } /> - {/*项目*/} + + {/* 组织 */} + { + return () + } + }> + + + {/*新建项目等*/} ) } }> - : pathType === '404' ? : + : pathType === '404' ? : ( @@ -357,14 +363,6 @@ class App extends Component { } - {/* 组织 */} - { - return () - } - }> - {/* 个人主页 */} { }) function locationurl(list) { - if (window.location.port !== "3007") { + // if (window.location.port !== "3007") { window.location.href = list - } + // } } // TODO 开发期多个身份切换 let debugType = "" diff --git a/src/forge/Activity/ActivityItem.js b/src/forge/Activity/ActivityItem.js index 978498b2..2b1ad3c8 100644 --- a/src/forge/Activity/ActivityItem.js +++ b/src/forge/Activity/ActivityItem.js @@ -14,14 +14,14 @@ class ActivityItem extends Component { {/* 如果是版本发布 */} {item.trend_type === "VersionRelease" ?

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

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

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

: diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index a0127115..31ced220 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(`/${owner}/${projectsId}/devops/dispose`); + props.history.push(`/${owner}/${projectsId}/devops`); // 需要将顶部的open_devops修改 let { changeOpenDevops } = props; changeOpenDevops && changeOpenDevops(true); diff --git a/src/forge/DevOps/Dispose.jsx b/src/forge/DevOps/Dispose.jsx index 4771816b..1e08cdab 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(`/${owner}/${projectsId}/devops/dispose/${result.data.id}`); + props.history.push(`/${owner}/${projectsId}/devops/${result.data.id}`); }else{ props.showNotification("流水线新增失败,请稍后再试!"); } diff --git a/src/forge/DevOps/Dispose/List.jsx b/src/forge/DevOps/Dispose/List.jsx index 18755e08..297c5556 100644 --- a/src/forge/DevOps/Dispose/List.jsx +++ b/src/forge/DevOps/Dispose/List.jsx @@ -117,7 +117,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){ return( { operate ? - + 编辑 :"" } { operate ? diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index 0878425a..3302f603 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -36,11 +36,7 @@ export default ((props)=>{ return( - () - } - > + () @@ -51,24 +47,26 @@ export default ((props)=>{ (p) => () } > - () } > - () - } - > + () } > + () + } + > + {/* 原本的两种合为一个 */} () + (p) =>{return( p.location.state.open_devops?:)} } > diff --git a/src/forge/DevOps/Infos.jsx b/src/forge/DevOps/Infos.jsx index c51fc87d..99029cde 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 e63d2f1e..6df62dd4 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 bf70d760..204fd161 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 ff98b5a9..99040d38 100644 --- a/src/forge/DevOps/Structure.jsx +++ b/src/forge/DevOps/Structure.jsx @@ -290,7 +290,7 @@ function Structure(props,ref){ 构建列表 - 返回 + 返回
diff --git a/src/forge/DevOps/disposePipeline.jsx b/src/forge/DevOps/disposePipeline.jsx index 808ecc00..deabc149 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(`/${owner}/${projectsId}/devops/dispose`); + props.history.push(`/${owner}/${projectsId}/devops`); } setLoading(false); }).catch(error=>{ diff --git a/src/forge/DevOps/opsDetail.jsx b/src/forge/DevOps/opsDetail.jsx index df265f15..1944dfe6 100644 --- a/src/forge/DevOps/opsDetail.jsx +++ b/src/forge/DevOps/opsDetail.jsx @@ -87,7 +87,7 @@ export default (props) => { 退出 diff --git a/src/forge/Index.js b/src/forge/Index.js index 2423f000..1508660e 100644 --- a/src/forge/Index.js +++ b/src/forge/Index.js @@ -12,8 +12,13 @@ import Loadable from "react-loadable"; import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; +//404页面 +const Shixunnopage = Loadable({ + loader: () => import('../modules/404/Shixunnopage'), + loading: Loading, +}) const ProjectNew = Loadable({ - loader: () => import("./New/Index"), + loader: () => import("./New/Index"), loading: Loading, }); const ProjectIndex = Loadable({ @@ -29,14 +34,15 @@ const ProjectIndex = Loadable({ class Index extends Component { - componentDidUpdate=()=>{ - this.props.history.listen(()=>{ + componentDidUpdate = () => { + this.props.history.listen(() => { if (document.body.scrollTop || document.documentElement.scrollTop > 0) { window.scrollTo(0, 0) } }) } render() { + return (
@@ -70,6 +76,13 @@ class Index extends Component { )} > + + ( + + )} + >
); diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 1b68bd62..e2dbc49d 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -351,13 +351,13 @@ function CoderDepot(props){ }
- + {projectDetail && projectDetail.branches && projectDetail.branches.total_count}个分支 - + {projectDetail && projectDetail.tags && projectDetail.tags.total_count}个标签 diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js index c6c7b8da..0fb30c4e 100644 --- a/src/forge/Main/CoderRootIndex.js +++ b/src/forge/Main/CoderRootIndex.js @@ -132,12 +132,12 @@ class CoderRootIndex extends Component{ () => () } > - () } > - () } diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index f70f2266..99b3803b 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -153,8 +153,8 @@ function checkPathname(projectsId, owner, pathname) { name = "milestones" } else if (url.indexOf("/activity") > -1) { name = "activity" - } else if (url.indexOf("/setting") > -1) { - name = "setting" + } else if (url.indexOf("/settings") > -1) { + name = "settings" } else if (url.indexOf(`/devops`) > -1) { name = "devops" } else if (url.indexOf(`/source`) > -1) { @@ -544,7 +544,7 @@ class Detail extends Component { { forked_count > 0 ? platform ? - + {forked_count} : @@ -625,17 +625,12 @@ class Detail extends Component { } > {/* 仓库设置 */} - () } > - {/* 任务详情 */} - () - } - > + {/*修改里程碑*/} () } + > + {/* 任务详情 */} + () + } > {/* 动态 */} () } > - () } diff --git a/src/forge/Main/DetailTop.js b/src/forge/Main/DetailTop.js index 7a0f6998..ecd5ab9f 100644 --- a/src/forge/Main/DetailTop.js +++ b/src/forge/Main/DetailTop.js @@ -16,11 +16,11 @@ class DetailTop extends Component { {(coderCount && coderCount.commits_count) || 0}个提交 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.branches_count) || 0}个分支 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.tags_count) || 0}个标签 diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index ec985ecc..2265ac20 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -28,7 +28,7 @@ class IndexItem extends Component { : - + } diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index 03b55db7..abce4003 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -77,7 +77,8 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa { item.menu_name === "devops" && platform ?
  • - + {/* */} + 工作流(beta版) {projectDetail && projectDetail.ops_count ? {projectDetail.ops_count} : ""} @@ -114,10 +115,10 @@ 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"}> + item.menu_name === "settings" && +
  • + + 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}> 仓库设置
  • diff --git a/src/forge/Notice/Notify.jsx b/src/forge/Notice/Notify.jsx index 96b9e687..31373908 100644 --- a/src/forge/Notice/Notify.jsx +++ b/src/forge/Notice/Notify.jsx @@ -80,9 +80,10 @@ function Notify(props){
      { list.map((i,k)=>{ + console.log(i); return(
    • - +

      {i.applied_user && i.applied_user.name} diff --git a/src/forge/Order/Milepostitem.js b/src/forge/Order/Milepostitem.js index 48bf65c1..d79c66fe 100644 --- a/src/forge/Order/Milepostitem.js +++ b/src/forge/Order/Milepostitem.js @@ -31,7 +31,7 @@ class OrderItem extends Component {

      - {item.name} + {item.name}
      @@ -65,7 +65,7 @@ class OrderItem extends Component {
      - 编辑 + 编辑
      diff --git a/src/forge/Order/OrderItem.js b/src/forge/Order/OrderItem.js index 30918535..08178864 100644 --- a/src/forge/Order/OrderItem.js +++ b/src/forge/Order/OrderItem.js @@ -52,7 +52,7 @@ class OrderItem extends Component { {current_user && current_user.login && checkbox}

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

      @@ -89,7 +89,7 @@ class OrderItem extends Component {

    • {item.done_ratio || "--"}
    • - {item.journals_count} + {item.journals_count} { user_admin_or_member ?
      diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 22b8155b..6515dde8 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(`/${owner}/${projectsId}/issues/${result.data.id}/detail`); + this.props.history.push(`/${owner}/${projectsId}/issues/${result.data.id}`); this.setState({ description: "", isSpin: false, @@ -191,7 +191,7 @@ class order_form extends Component { ...values, }).then((result) => { if (result) { - this.props.history.push(`/${owner}/${projectsId}/issues/${orderId}/detail`); + this.props.history.push(`/${owner}/${projectsId}/issues/${orderId}`); 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" ? `/${owner}/${projectsId || orderId}/issues` : `/${owner}/${projectsId}/issues/${orderId}/detail`)} + this.props.history.push(form_type === "new" ? `/${owner}/${projectsId || orderId}/issues` : `/${owner}/${projectsId}/issues/${orderId}`)} > 取消 diff --git a/src/forge/Settings/Branch.js b/src/forge/Settings/Branch.js index 1570e6a6..ed3728a2 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(`/${owner}/${projectsId}/setting/branch/${protectBranch}`); + props.history.push(`/${owner}/${projectsId}/settings/branch/${protectBranch}`); } // 翻页 diff --git a/src/forge/Settings/BranchRule.jsx b/src/forge/Settings/BranchRule.jsx index 90b00abe..d131372f 100644 --- a/src/forge/Settings/BranchRule.jsx +++ b/src/forge/Settings/BranchRule.jsx @@ -290,7 +290,7 @@ export default Form.create()( { - history.push(`/${owner}/${projectsId}/setting/branch`); + history.push(`/${owner}/${projectsId}/settings/branch`); }} > 取消 diff --git a/src/forge/Settings/CollaboratorGroup.jsx b/src/forge/Settings/CollaboratorGroup.jsx index 4002d4cd..5c38b1aa 100644 --- a/src/forge/Settings/CollaboratorGroup.jsx +++ b/src/forge/Settings/CollaboratorGroup.jsx @@ -78,7 +78,7 @@ function CollaboratorGroup({ newGroupId, owner, projectsId , setAddOperation }) dataIndex: "name", render: (value, item) => { if(item.is_admin || item.is_member){ - return {value}; + return {value}; }else{ return {value}; } diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js index a610080d..92b60aaf 100644 --- a/src/forge/Settings/Index.js +++ b/src/forge/Settings/Index.js @@ -49,25 +49,25 @@ class Index extends Component { const { projectsId , owner } = this.props.match.params; const { pathname } = this.props.history.location; - const flag = pathname === `/${owner}/${projectsId}/setting`; + const flag = pathname === `/${owner}/${projectsId}/settings`; return (
      • - + 基本设置

      • -1 ? "active" : "" + pathname.indexOf("settings/collaborators") > -1 ? "active" : "" } >

        - + 协作者管理 @@ -75,11 +75,11 @@ class Index extends Component {

      • -1 ? "active" : "" + pathname.indexOf("settings/webhooks") > -1 ? "active" : "" } >

        - + Webhooks @@ -87,21 +87,21 @@ class Index extends Component {

      • -1 ? "active" : "" + pathname.indexOf("settings/branch") > -1 ? "active" : "" } >

        - + 分支设置

      • -1 ? "active" : ""} + className={pathname.indexOf("settings/lables") > -1 ? "active" : ""} >

        - + 项目标签 @@ -110,7 +110,7 @@ class Index extends Component { {/*

      • -1 ? "active" : "" + pathname.indexOf("settings/manage") > -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 f3f5e26a..57df13b4 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(`/${owner}/${projectsId}/setting/webhooks/new`) + props.history.push(`/${owner}/${projectsId}/settings/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 18b64b98..d90934f0 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(`/${owner}/${projectsId}/setting/webhooks`); + history.push(`/${owner}/${projectsId}/settings/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(`/${owner}/${projectsId}/setting/webhooks`); + history.push(`/${owner}/${projectsId}/settings/webhooks`); } }).catch(error=>{}) } @@ -157,7 +157,7 @@ function New({ form , match , showNotification , history }) { axios.delete(url).then(result=>{ if(result){ showNotification("webhook删除成功!"); - history.push(`/${owner}/${projectsId}/setting/webhooks`); + history.push(`/${owner}/${projectsId}/settings/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/GroupDetailSetting.jsx b/src/forge/Team/Group/GroupDetailSetting.jsx index e8be3722..168ba6ff 100644 --- a/src/forge/Team/Group/GroupDetailSetting.jsx +++ b/src/forge/Team/Group/GroupDetailSetting.jsx @@ -26,18 +26,18 @@ export default (props)=>{ function returnActive (pathname){ let a = 0; - if(pathname === `/${OIdentifier}/group/${groupId}/setting/member`){ + if(pathname === `/${OIdentifier}/teams/${groupId}/setting/member`){ a = 1; - }else if(pathname === `/${OIdentifier}/group/${groupId}/setting/project`){ + }else if(pathname === `/${OIdentifier}/teams/${groupId}/setting/project`){ a = 2; } return a; } const active = returnActive(pathname); const array = {list:[ - {name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/group/${groupId}/setting`}, - {name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/group/${groupId}/setting/member`}, - {name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/group/${groupId}/setting/project`}, + {name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/teams/${groupId}/setting`}, + {name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/teams/${groupId}/setting/member`}, + {name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/teams/${groupId}/setting/project`}, ], active } @@ -51,19 +51,19 @@ export default (props)=>{ ( )} > ( )} > ( )} diff --git a/src/forge/Team/Group/GroupDetails.jsx b/src/forge/Team/Group/GroupDetails.jsx index b35132bc..ba569386 100644 --- a/src/forge/Team/Group/GroupDetails.jsx +++ b/src/forge/Team/Group/GroupDetails.jsx @@ -119,7 +119,7 @@ export default ((props) => {

        管理员团队对 所有仓库 具有操作权限,且对组织具有 管理员权限

        此外,该团队拥有了 创建仓库 的权限:成员可以在组织中创建新的仓库。

        - {group.is_admin ? : ""} + {group.is_admin ? : ""}
      : diff --git a/src/forge/Team/Group/GroupForm.jsx b/src/forge/Team/Group/GroupForm.jsx index 29fe2858..dad9b64b 100644 --- a/src/forge/Team/Group/GroupForm.jsx +++ b/src/forge/Team/Group/GroupForm.jsx @@ -90,7 +90,7 @@ export default Form.create()( }).then(result => { if (result && result.data) { showNotification("基本设置更新成功!"); - history.push(`/${OIdentifier}/group/${groupId}`); + history.push(`/${OIdentifier}/teams/${groupId}`); } }).catch(error => { }) } else { @@ -101,7 +101,7 @@ export default Form.create()( }).then(result => { if (result && result.data) { showNotification("团队创建成功!"); - history.push(`/${OIdentifier}/group/${result.data.id}`); + history.push(`/${OIdentifier}/teams/${result.data.id}`); } }).catch(error => { }) } @@ -154,7 +154,7 @@ export default Form.create()( function cancelEdit(){ if(groupId){ - history.push(`/${OIdentifier}/group/${groupId}`); + history.push(`/${OIdentifier}/teams/${groupId}`); }else{ history.push(`/${OIdentifier}`); } diff --git a/src/forge/Team/Index.jsx b/src/forge/Team/Index.jsx index 4dfa85f4..1a3bfde9 100644 --- a/src/forge/Team/Index.jsx +++ b/src/forge/Team/Index.jsx @@ -36,34 +36,6 @@ export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC( return (
      - {/* 组织团队-设置 */} - { - return - }} - > - {/* 组织团队-新建 */} - { - return - }} - > - {/* 组织团队-子级(包含组织团队列表) */} - { - return - }} - > - {/* 组织成员 */} - { - return - }} - > {/* 新建组织 */} }} > + {/* 组织团队-新建 */} + { + return + }} + > + {/* 组织团队-设置 */} + { + return + }} + > + {/* 组织团队-子级(包含组织团队列表) */} + { + return + }} + > + {/* 组织成员 */} + { + return + }} + > + {/* 组织详情(包含组织设置) */} { memberData && memberData.organization_users && memberData.organization_users.length>0 ? - + { memberData.organization_users.map((item,key)=>{ return( @@ -93,11 +93,11 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet history.push(`/${OIdentifier}/group/new`)} + sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)} className={"ant-btn ant-btn-primary"} >新建团队 } - url={`/${OIdentifier}/group`} + url={`/${OIdentifier}/teams`} > { groupData && groupData.teams && groupData.teams.length>0? @@ -108,7 +108,7 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
      { (item.is_admin || item.is_member) ? - {item.name} + {item.name} : {item.name} } diff --git a/src/forge/Team/Setting/TeamSettingGroup.jsx b/src/forge/Team/Setting/TeamSettingGroup.jsx index 006d579c..8ebdb4af 100644 --- a/src/forge/Team/Setting/TeamSettingGroup.jsx +++ b/src/forge/Team/Setting/TeamSettingGroup.jsx @@ -3,11 +3,11 @@ import { WhiteBack , Banner } from '../../Component/layout'; import GroupItems from '../TeamGroupItems'; const limit = 8; -function TeamSettingGroup({organizeDetail,history}){ +function TeamSettingGroup({organizeDetail,history,current_user}){ return( 组织团队管理 - + ) } diff --git a/src/forge/Team/Sub/Detail.jsx b/src/forge/Team/Sub/Detail.jsx index 6919d3d5..f591c864 100644 --- a/src/forge/Team/Sub/Detail.jsx +++ b/src/forge/Team/Sub/Detail.jsx @@ -43,7 +43,7 @@ function Detail(props){ }else{ setFlag(true); } - if(pathname.indexOf(`/${OIdentifier}/group`)>-1 || pathname.indexOf(`/${OIdentifier}/member`)>-1){ + if(pathname.indexOf(`/${OIdentifier}/teams`)>-1 || pathname.indexOf(`/${OIdentifier}/members`)>-1){ setButtonflagFlag(true); }else{ setButtonflagFlag(false); @@ -88,8 +88,8 @@ function Detail(props){ :""} {buttonflag && - 组织成员{detail.num_users && {detail.num_users}} - 组织团队{detail.num_teams &&{detail.num_teams}} + 组织成员{detail.num_users && {detail.num_users}} + 组织团队{detail.num_teams &&{detail.num_teams}} } @@ -112,21 +112,21 @@ function Detail(props){ {/* 组织团队-详情 */} { return }} > {/* 组织成员 */} { return }} > {/* 组织团队 */} { return }} diff --git a/src/forge/Team/Sub/SubDetail.jsx b/src/forge/Team/Sub/SubDetail.jsx index 94ac6a2a..b4f1d036 100644 --- a/src/forge/Team/Sub/SubDetail.jsx +++ b/src/forge/Team/Sub/SubDetail.jsx @@ -22,7 +22,7 @@ export default ((props)=>{ // 设置页面:顶部不需要设置按钮了 useEffect(()=>{ if(pathname){ - if(pathname.indexOf(`/${OIdentifier}/group/${groupId}/setting`)>-1){ + if(pathname.indexOf(`/${OIdentifier}/teams/${groupId}/setting`)>-1){ setFlag(false); }else{ setFlag(true); @@ -55,12 +55,12 @@ export default ((props)=>{ { detail && - 组织成员{detail.num_users && {detail.num_users}} - 组织团队{detail.num_teams &&{detail.num_teams}} + 组织成员{detail.num_users && {detail.num_users}} + 组织团队{detail.num_teams &&{detail.num_teams}} } desc={!flag && detail.description} @@ -69,7 +69,7 @@ export default ((props)=>{ {/* 组织团队-设置 */} { return }} diff --git a/src/forge/Team/TeamGroup.jsx b/src/forge/Team/TeamGroup.jsx index 38725e7d..1920caed 100644 --- a/src/forge/Team/TeamGroup.jsx +++ b/src/forge/Team/TeamGroup.jsx @@ -3,11 +3,11 @@ import { Banner } from '../Component/layout'; import GroupItems from './TeamGroupItems'; const limit = 14; -function TeamGroup({organizeDetail,history}){ +function TeamGroup({organizeDetail,history,current_user}){ return(
      组织团队 - +
      ) } diff --git a/src/forge/Team/TeamGroupItems.jsx b/src/forge/Team/TeamGroupItems.jsx index 78085b77..5a955818 100644 --- a/src/forge/Team/TeamGroupItems.jsx +++ b/src/forge/Team/TeamGroupItems.jsx @@ -17,7 +17,7 @@ const ImgContent = styled.img`{ border-radius:50%; margin:5px 10px; }` -function TeamGroupItems({organizeDetail,limit, count , history}){ +function TeamGroupItems({organizeDetail,limit, count , history ,current_user}){ const [ page , setPage ] = useState(1); const [ isSpin , setIsSpin ] = useState(true); const [ total , setTotal ] = useState(0); @@ -48,12 +48,13 @@ function TeamGroupItems({organizeDetail,limit, count , history}){ axios.delete(url).then(result =>{ if(result && result.data){ getData(); + history.push(`/${current_user && current_user.login}`); } }).catch(error=>{}) } // 团队设置 function toGroupSetting(id){ - history.push(`/${organizeDetail && organizeDetail.name}/group/${id}/setting`); + history.push(`/${organizeDetail && organizeDetail.name}/teams/${id}/setting`); } // 解散团队 function disMissGroup(id){ @@ -77,7 +78,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){

      { (item.is_admin || item.is_member) ? - {item.nickname} + {item.nickname} : {item.nickname} } @@ -94,7 +95,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){ k < count ? : k === count ? - + :"" ) }) diff --git a/src/forge/users/CIList.jsx b/src/forge/users/CIList.jsx index 9953fa7b..f4540412 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 ? 已激活 : diff --git a/src/forge/users/GeneralView/Activity.jsx b/src/forge/users/GeneralView/Activity.jsx index ce09e885..cefb4584 100644 --- a/src/forge/users/GeneralView/Activity.jsx +++ b/src/forge/users/GeneralView/Activity.jsx @@ -11,10 +11,10 @@ function Activity({list}) { list.map((i,k)=>{ return(
    • - +
      - {i.user_name} + {i.user_name} {i.action_time} {i.priority && TagInfo(`${i.priority}`,"")} {i.issue_status && {i.issue_status} } diff --git a/src/forge/users/Index.jsx b/src/forge/users/Index.jsx index 7e209113..66c86ea3 100644 --- a/src/forge/users/Index.jsx +++ b/src/forge/users/Index.jsx @@ -10,11 +10,6 @@ const Infos = Loadable({ loader: () => import("./Infos"), loading: Loading, }); -//forge项目 -// const Projects = Loadable({ -// loader: () => import('../Index'), -// loading: Loading, -// }) // forge项目详情 const ProjectDetail = Loadable({ loader: () => import("../Main/Detail"), @@ -25,20 +20,10 @@ export default withRouter( // 个人中心新增的二级目录都需在此添加一次。将项目放组织和个人名下后,此处根据二级目录作判断, let secondRouter = ''; - let firstRouter = ''; if (props.location.pathname) { - firstRouter =props.location.pathname.split('/')[1]; secondRouter = props.location.pathname.split('/')[2]; } - // 如果是explore,把所有路由相关的都改成当前登录人; - let changePathProps={...props}; - if(firstRouter==='explore'){ - let login=props.current_user.login; - changePathProps.match.path=`/${login}`; - changePathProps.match.url=`/${login}`; - changePathProps.location.pathname=`/${login}`; - changePathProps.history.location.pathname=`/${login}`; - } + let userRouterArr = ['statistics', 'projects', 'notice', 'devops', 'organizes', 'info', 'watchers', 'fan_users', 'password']; return ( @@ -51,7 +36,7 @@ export default withRouter( > : ( - + )} >} diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index 44bf2f39..0e56aaef 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -282,7 +282,7 @@ class Infos extends Component { 概览 数据统计 - 项目 + 项目 { current_user && user && user.login === current_user.login ? @@ -338,7 +338,7 @@ class Infos extends Component { }} > { return ; }} diff --git a/src/modules/search/index.jsx b/src/modules/search/index.jsx index 483309d7..3afd1ae5 100644 --- a/src/modules/search/index.jsx +++ b/src/modules/search/index.jsx @@ -10,11 +10,6 @@ import './index.scss'; const { Search } = Input; const { TabPane } = Tabs; -// const https = 'http://192.168.0.77:8081'; //曾伟内网后台 -// const https = 'http://192.168.31.104:8081'; //曾伟外网后台 -// const https='http://106.75.31.211:58081'; -const https = 'https://test-statistics.trustie.net'; - const GlobalSearch = ({ location, showNotification, history }) => { const size = 10; @@ -58,6 +53,8 @@ const GlobalSearch = ({ location, showNotification, history }) => { } function searchDataList() { + let chromesettingArray = JSON.parse(localStorage.getItem('chromesetting')); + let https = chromesettingArray.common.search || 'https://statistics.trustie.net'; const url = https + '/search'; if (!term) { // showNotification('请输入关键字');