Merge pull request '修改例子中的路由以及新提出的路由,修改之前由于修改路由带来的issue' (#40) from tongChong/forgeplus-react:feature_router into feature_router
This commit is contained in:
commit
47f5d98d79
30
src/App.js
30
src/App.js
|
@ -105,7 +105,7 @@ class App extends Component {
|
||||||
occupation: 0,
|
occupation: 0,
|
||||||
mygetHelmetapi: null,
|
mygetHelmetapi: null,
|
||||||
pathType: null,
|
pathType: null,
|
||||||
pathName: '',
|
pathName: null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class App extends Component {
|
||||||
this.unlisten = this.props.history.listen((location) => {
|
this.unlisten = this.props.history.listen((location) => {
|
||||||
let newPathname = location.pathname.split('/')[1];
|
let newPathname = location.pathname.split('/')[1];
|
||||||
if (this.state.pathName !== newPathname) {
|
if (this.state.pathName !== newPathname) {
|
||||||
this.setState({ pathType: '' });
|
// this.setState({ pathType: '' });
|
||||||
newPathname && this.getPathnameType(newPathname);
|
newPathname && this.getPathnameType(newPathname);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -175,7 +175,6 @@ class App extends Component {
|
||||||
const msg = `${event.type}: ${event.message}`;
|
const msg = `${event.type}: ${event.message}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
@ -309,15 +308,22 @@ class App extends Component {
|
||||||
<Route exact path="/explore"
|
<Route exact path="/explore"
|
||||||
render={
|
render={
|
||||||
(props) => (
|
(props) => (
|
||||||
personal && personal.length > 0 ?
|
|
||||||
<InfosIndex {...this.props} {...props} />
|
|
||||||
:
|
|
||||||
<ProjectIndex {...this.props} {...props} />
|
<ProjectIndex {...this.props} {...props} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/*项目*/}
|
|
||||||
|
{/* 组织 */}
|
||||||
|
<Route path={"/organize"}
|
||||||
|
render={
|
||||||
|
(props) => {
|
||||||
|
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||||
|
}
|
||||||
|
}>
|
||||||
|
</Route>
|
||||||
|
|
||||||
|
{/*新建项目等*/}
|
||||||
<Route
|
<Route
|
||||||
path={"/projects"}
|
path={"/projects"}
|
||||||
render={
|
render={
|
||||||
|
@ -342,7 +348,7 @@ class App extends Component {
|
||||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||||
}
|
}
|
||||||
}>
|
}>
|
||||||
</Route> : pathType === '404' ? <Route path="/nopage" component={Shixunnopage} /> :
|
</Route> : pathType === '404' ? <Route path="/" component={Shixunnopage} /> :
|
||||||
<Route exact path="/"
|
<Route exact path="/"
|
||||||
render={
|
render={
|
||||||
(props) => (
|
(props) => (
|
||||||
|
@ -357,14 +363,6 @@ class App extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{/* 组织 */}
|
|
||||||
<Route path={"/organize"}
|
|
||||||
render={
|
|
||||||
(props) => {
|
|
||||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
|
||||||
}
|
|
||||||
}>
|
|
||||||
</Route>
|
|
||||||
|
|
||||||
{/* 个人主页 */}
|
{/* 个人主页 */}
|
||||||
<Route path="/:username"
|
<Route path="/:username"
|
||||||
|
|
|
@ -11,9 +11,9 @@ broadcastChannelOnmessage('refreshPage', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
function locationurl(list) {
|
function locationurl(list) {
|
||||||
if (window.location.port !== "3007") {
|
// if (window.location.port !== "3007") {
|
||||||
window.location.href = list
|
window.location.href = list
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
// TODO 开发期多个身份切换
|
// TODO 开发期多个身份切换
|
||||||
let debugType = ""
|
let debugType = ""
|
||||||
|
|
|
@ -14,14 +14,14 @@ class ActivityItem extends Component {
|
||||||
{/* 如果是版本发布 */}
|
{/* 如果是版本发布 */}
|
||||||
{item.trend_type === "VersionRelease" ?
|
{item.trend_type === "VersionRelease" ?
|
||||||
<p className="itemLine">
|
<p className="itemLine">
|
||||||
<Link to={`/${owner}/${projectsId}/version`} className="color-blue font-16">{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/releases`} className="color-blue font-16">{item.name}</Link>
|
||||||
<span className="activity_type">{item.trend_type}</span>
|
<span className="activity_type">{item.trend_type}</span>
|
||||||
</p >
|
</p >
|
||||||
:
|
:
|
||||||
// 如果是任务
|
// 如果是任务
|
||||||
item.trend_type === "Issue" ?
|
item.trend_type === "Issue" ?
|
||||||
<p className="itemLine">
|
<p className="itemLine">
|
||||||
<Link to={`/${owner}/${projectsId}/issues/${item.trend_id}/detail`} className="color-blue font-16">{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/issues/${item.trend_id}`} className="color-blue font-16">{item.name}</Link>
|
||||||
<span className="activity_type">{item.trend_type}</span>
|
<span className="activity_type">{item.trend_type}</span>
|
||||||
</p >
|
</p >
|
||||||
:
|
:
|
||||||
|
|
|
@ -149,7 +149,7 @@ function About(props, ref) {
|
||||||
axios.post(url).then(result=>{
|
axios.post(url).then(result=>{
|
||||||
setIsSpining(false);
|
setIsSpining(false);
|
||||||
if(result && result.data.status === 0){
|
if(result && result.data.status === 0){
|
||||||
props.history.push(`/${owner}/${projectsId}/devops/dispose`);
|
props.history.push(`/${owner}/${projectsId}/devops`);
|
||||||
// 需要将顶部的open_devops修改
|
// 需要将顶部的open_devops修改
|
||||||
let { changeOpenDevops } = props;
|
let { changeOpenDevops } = props;
|
||||||
changeOpenDevops && changeOpenDevops(true);
|
changeOpenDevops && changeOpenDevops(true);
|
||||||
|
|
|
@ -96,7 +96,7 @@ function Dispose(props){
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
props.showNotification("流水线新增成功,请进行工作流配置!");
|
props.showNotification("流水线新增成功,请进行工作流配置!");
|
||||||
props.history.push(`/${owner}/${projectsId}/devops/dispose/${result.data.id}`);
|
props.history.push(`/${owner}/${projectsId}/devops/${result.data.id}`);
|
||||||
}else{
|
}else{
|
||||||
props.showNotification("流水线新增失败,请稍后再试!");
|
props.showNotification("流水线新增失败,请稍后再试!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){
|
||||||
return(
|
return(
|
||||||
<span>
|
<span>
|
||||||
{ operate ?
|
{ operate ?
|
||||||
<Link to={`/${owner}/${projectsId}/devops/dispose/${item.id}`} className="mr10 color-grey-6">
|
<Link to={`/${owner}/${projectsId}/devops/${item.id}`} className="mr10 color-grey-6">
|
||||||
<i className="iconfont icon-zaibianji font-13 mr3"></i>编辑</Link> :""
|
<i className="iconfont icon-zaibianji font-13 mr3"></i>编辑</Link> :""
|
||||||
}
|
}
|
||||||
{ operate ?
|
{ operate ?
|
||||||
|
|
|
@ -36,11 +36,7 @@ export default ((props)=>{
|
||||||
return(
|
return(
|
||||||
<WhiteBack className="opsPanel">
|
<WhiteBack className="opsPanel">
|
||||||
<Switch {...props}>
|
<Switch {...props}>
|
||||||
<Route path="/:owner/:projectsId/devops/dispose/:disposeId"
|
|
||||||
render={
|
|
||||||
(p) => (<New {...props} {...p}/>)
|
|
||||||
}
|
|
||||||
></Route>
|
|
||||||
<Route path="/:owner/:projectsId/devops/params"
|
<Route path="/:owner/:projectsId/devops/params"
|
||||||
render={
|
render={
|
||||||
(p) => (<Params {...props} {...p}/>)
|
(p) => (<Params {...props} {...p}/>)
|
||||||
|
@ -51,24 +47,26 @@ export default ((props)=>{
|
||||||
(p) => (<Mould {...props} {...p}/>)
|
(p) => (<Mould {...props} {...p}/>)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
<Route path="/:owner/:projectsId/devops/dispose/new"
|
<Route path="/:owner/:projectsId/devops/new"
|
||||||
render={
|
render={
|
||||||
(p) => (<New {...props} {...p}/>)
|
(p) => (<New {...props} {...p}/>)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
<Route path="/:owner/:projectsId/devops/dispose"
|
|
||||||
render={
|
|
||||||
(p) => (<Dispose {...props} {...p}/>)
|
|
||||||
}
|
|
||||||
></Route>
|
|
||||||
<Route path="/:owner/:projectsId/devops/list/:branch"
|
<Route path="/:owner/:projectsId/devops/list/:branch"
|
||||||
render={
|
render={
|
||||||
(p) => (<Stucture {...props} {...p}/>)
|
(p) => (<Stucture {...props} {...p}/>)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
|
<Route path="/:owner/:projectsId/devops/:disposeId"
|
||||||
|
render={
|
||||||
|
(p) => (<New {...props} {...p}/>)
|
||||||
|
}
|
||||||
|
></Route>
|
||||||
|
{/* 原本的两种合为一个 */}
|
||||||
<Route path="/:owner/:projectsId/devops"
|
<Route path="/:owner/:projectsId/devops"
|
||||||
render={
|
render={
|
||||||
(p) => (<About {...props} {...p}/>)
|
(p) =>{return( p.location.state.open_devops?<Dispose {...props} {...p}/>:<About {...props} {...p}/>)}
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
|
@ -26,7 +26,7 @@ export default ((props)=>{
|
||||||
return(
|
return(
|
||||||
<div className="disposePanel">
|
<div className="disposePanel">
|
||||||
<Banner>
|
<Banner>
|
||||||
{ permission !=="Reporter" && <Link to={`/${owner}/${props.match.params.projectsId}/devops/dispose`}>工作流配置</Link>}
|
{ permission !=="Reporter" && <Link to={`/${owner}/${props.match.params.projectsId}/devops`}>工作流配置</Link>}
|
||||||
</Banner>
|
</Banner>
|
||||||
<Div>
|
<Div>
|
||||||
<Dispost {...props}/>
|
<Dispost {...props}/>
|
||||||
|
|
|
@ -104,7 +104,7 @@ function Params(props){
|
||||||
<Banner>
|
<Banner>
|
||||||
<FlexAJ>
|
<FlexAJ>
|
||||||
<span className="font-18">工作流 - 参数管理</span>
|
<span className="font-18">工作流 - 参数管理</span>
|
||||||
<Link to={`/${owner}/${projectsId}/devops/dispose`} className="font-14 color-grey-9 ml20">返回</Link>
|
<Link to={`/${owner}/${projectsId}/devops`} className="font-14 color-grey-9 ml20">返回</Link>
|
||||||
</FlexAJ>
|
</FlexAJ>
|
||||||
</Banner>
|
</Banner>
|
||||||
<Div className="disposeList">
|
<Div className="disposeList">
|
||||||
|
|
|
@ -126,7 +126,7 @@ function Mould(props){
|
||||||
<div>
|
<div>
|
||||||
<New wrappedComponentRef={(f) => childRef.current = f} ref={childRef} visible={visible} onCancel={()=>setVisible(false)} onOk={onOk}></New>
|
<New wrappedComponentRef={(f) => childRef.current = f} ref={childRef} visible={visible} onCancel={()=>setVisible(false)} onOk={onOk}></New>
|
||||||
<Banner>
|
<Banner>
|
||||||
<FlexAJ><span>工作流 - 模板管理</span><Link to={`/${owner}/${projectsId}/devops/dispose`} className="font-14 color-grey-9">返回</Link></FlexAJ>
|
<FlexAJ><span>工作流 - 模板管理</span><Link to={`/${owner}/${projectsId}/devops`} className="font-14 color-grey-9">返回</Link></FlexAJ>
|
||||||
</Banner>
|
</Banner>
|
||||||
<Div className="disposeList">
|
<Div className="disposeList">
|
||||||
<FlexAJ>
|
<FlexAJ>
|
||||||
|
|
|
@ -290,7 +290,7 @@ function Structure(props,ref){
|
||||||
<Banner>
|
<Banner>
|
||||||
<FlexAJ>
|
<FlexAJ>
|
||||||
<span>构建列表</span>
|
<span>构建列表</span>
|
||||||
<Link to={`/${owner}/${projectsId}/devops/dispose`} className="font-15 color-grey-9">返回</Link>
|
<Link to={`/${owner}/${projectsId}/devops`} className="font-15 color-grey-9">返回</Link>
|
||||||
</FlexAJ>
|
</FlexAJ>
|
||||||
</Banner>
|
</Banner>
|
||||||
<Div>
|
<Div>
|
||||||
|
|
|
@ -275,7 +275,7 @@ function disposePipeline(props){
|
||||||
...params
|
...params
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result){
|
if(result){
|
||||||
props.history.push(`/${owner}/${projectsId}/devops/dispose`);
|
props.history.push(`/${owner}/${projectsId}/devops`);
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}).catch(error=>{
|
}).catch(error=>{
|
||||||
|
|
|
@ -87,7 +87,7 @@ export default (props) => {
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
<Link
|
<Link
|
||||||
style={{ color: "#ddd" }}
|
style={{ color: "#ddd" }}
|
||||||
to={`/${owner}/${projectId}/devops/dispose`}
|
to={`/${owner}/${projectId}/devops`}
|
||||||
>
|
>
|
||||||
<i className="iconfont icon-yiguanbi font-15 mr5"></i>退出
|
<i className="iconfont icon-yiguanbi font-15 mr5"></i>退出
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -12,6 +12,11 @@ import Loadable from "react-loadable";
|
||||||
import Loading from "../Loading";
|
import Loading from "../Loading";
|
||||||
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
||||||
|
|
||||||
|
//404页面
|
||||||
|
const Shixunnopage = Loadable({
|
||||||
|
loader: () => import('../modules/404/Shixunnopage'),
|
||||||
|
loading: Loading,
|
||||||
|
})
|
||||||
const ProjectNew = Loadable({
|
const ProjectNew = Loadable({
|
||||||
loader: () => import("./New/Index"),
|
loader: () => import("./New/Index"),
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
|
@ -37,6 +42,7 @@ class Index extends Component {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="newMain clearfix">
|
<div className="newMain clearfix">
|
||||||
<Switch {...this.props}>
|
<Switch {...this.props}>
|
||||||
|
@ -70,6 +76,13 @@ class Index extends Component {
|
||||||
<ProjectIndex {...this.props} {...props} />
|
<ProjectIndex {...this.props} {...props} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
|
|
||||||
|
<Route
|
||||||
|
path="/"
|
||||||
|
render={(props) => (
|
||||||
|
<ProjectIndex {...this.props} {...props} />
|
||||||
|
)}
|
||||||
|
></Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -347,13 +347,13 @@ function CoderDepot(props){
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<AlignCenter className="mr20">
|
<AlignCenter className="mr20">
|
||||||
<Link to={`/${owner}/${projectsId}/branchs`} className="color-grey-9">
|
<Link to={`/${owner}/${projectsId}/branches`} className="color-grey-9">
|
||||||
<i className="iconfont icon-fenzhi2 font-18 color-grey-9 mr3"></i>
|
<i className="iconfont icon-fenzhi2 font-18 color-grey-9 mr3"></i>
|
||||||
<span className="color-grey-6 mr3">{projectDetail && projectDetail.branches && projectDetail.branches.total_count}个</span>分支
|
<span className="color-grey-6 mr3">{projectDetail && projectDetail.branches && projectDetail.branches.total_count}个</span>分支
|
||||||
</Link>
|
</Link>
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
<AlignCenter className="mr20">
|
<AlignCenter className="mr20">
|
||||||
<Link to={`/${owner}/${projectsId}/tag`} className="color-grey-9">
|
<Link to={`/${owner}/${projectsId}/tags`} className="color-grey-9">
|
||||||
<i className="iconfont icon-biaoqian3 font-16 color-grey-9 mr3"></i>
|
<i className="iconfont icon-biaoqian3 font-16 color-grey-9 mr3"></i>
|
||||||
<span className="color-grey-6 mr3">{projectDetail && projectDetail.tags && projectDetail.tags.total_count}个</span>标签
|
<span className="color-grey-6 mr3">{projectDetail && projectDetail.tags && projectDetail.tags.total_count}个</span>标签
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -132,12 +132,12 @@ class CoderRootIndex extends Component{
|
||||||
() => (<CoderRootVersion {...this.props} {...this.state} />)
|
() => (<CoderRootVersion {...this.props} {...this.state} />)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
<Route path="/:owner/:projectsId/tag"
|
<Route path="/:owner/:projectsId/tags"
|
||||||
render={
|
render={
|
||||||
() => (<CoderRootTag {...this.props} {...this.state} />)
|
() => (<CoderRootTag {...this.props} {...this.state} />)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
<Route path="/:owner/:projectsId/branchs"
|
<Route path="/:owner/:projectsId/branches"
|
||||||
render={
|
render={
|
||||||
() => (<CoderRootBranch {...this.props} {...this.state} />)
|
() => (<CoderRootBranch {...this.props} {...this.state} />)
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,8 +153,8 @@ function checkPathname(projectsId, owner, pathname) {
|
||||||
name = "milestones"
|
name = "milestones"
|
||||||
} else if (url.indexOf("/activity") > -1) {
|
} else if (url.indexOf("/activity") > -1) {
|
||||||
name = "activity"
|
name = "activity"
|
||||||
} else if (url.indexOf("/setting") > -1) {
|
} else if (url.indexOf("/settings") > -1) {
|
||||||
name = "setting"
|
name = "settings"
|
||||||
} else if (url.indexOf(`/devops`) > -1) {
|
} else if (url.indexOf(`/devops`) > -1) {
|
||||||
name = "devops"
|
name = "devops"
|
||||||
} else if (url.indexOf(`/source`) > -1) {
|
} else if (url.indexOf(`/source`) > -1) {
|
||||||
|
@ -544,7 +544,7 @@ class Detail extends Component {
|
||||||
{
|
{
|
||||||
forked_count > 0 ?
|
forked_count > 0 ?
|
||||||
platform ?
|
platform ?
|
||||||
<Link className="detail_tag_btn_count" to={{ pathname: `/${owner}/${projectsId}/fork_users`, state }}>
|
<Link className="detail_tag_btn_count" to={{ pathname: `/${owner}/${projectsId}/members`, state }}>
|
||||||
{forked_count}
|
{forked_count}
|
||||||
</Link>
|
</Link>
|
||||||
:
|
:
|
||||||
|
@ -625,17 +625,12 @@ class Detail extends Component {
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 仓库设置 */}
|
{/* 仓库设置 */}
|
||||||
<Route path="/:owner/:projectsId/setting"
|
<Route path="/:owner/:projectsId/settings"
|
||||||
render={
|
render={
|
||||||
(props) => (<Setting {...this.props} {...props} {...this.state} {...common} />)
|
(props) => (<Setting {...this.props} {...props} {...this.state} {...common} />)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 任务详情 */}
|
|
||||||
<Route path="/:owner/:projectsId/issues/:orderId/detail"
|
|
||||||
render={
|
|
||||||
(props) => (<OrderDetail {...this.props} {...this.state} {...props} {...common} />)
|
|
||||||
}
|
|
||||||
></Route>
|
|
||||||
{/*修改里程碑*/}
|
{/*修改里程碑*/}
|
||||||
<Route path="/:owner/:projectsId/milestones/:meilid/edit"
|
<Route path="/:owner/:projectsId/milestones/:meilid/edit"
|
||||||
render={
|
render={
|
||||||
|
@ -683,6 +678,12 @@ class Detail extends Component {
|
||||||
render={
|
render={
|
||||||
(props) => (<OrdercopyDetail {...this.props} {...props} {...this.state} {...common} />)
|
(props) => (<OrdercopyDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||||
}
|
}
|
||||||
|
></Route>
|
||||||
|
{/* 任务详情 */}
|
||||||
|
<Route path="/:owner/:projectsId/issues/:orderId"
|
||||||
|
render={
|
||||||
|
(props) => (<OrderDetail {...this.props} {...this.state} {...props} {...common} />)
|
||||||
|
}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 动态 */}
|
{/* 动态 */}
|
||||||
<Route path="/:owner/:projectsId/activity"
|
<Route path="/:owner/:projectsId/activity"
|
||||||
|
@ -738,7 +739,7 @@ class Detail extends Component {
|
||||||
(props) => (<PraiseUsers {...this.props} {...props} {...this.state} {...common} />)
|
(props) => (<PraiseUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
<Route path="/:owner/:projectsId/fork_users"
|
<Route path="/:owner/:projectsId/members"
|
||||||
render={
|
render={
|
||||||
(props) => (<ForkUsers {...this.props} {...props} {...this.state} {...common} />)
|
(props) => (<ForkUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,11 @@ class DetailTop extends Component {
|
||||||
<i className="iconfont icon-tijiaojilu font-20 mr3 font-bd"></i>
|
<i className="iconfont icon-tijiaojilu font-20 mr3 font-bd"></i>
|
||||||
<span>{(coderCount && coderCount.commits_count) || 0}</span>个提交
|
<span>{(coderCount && coderCount.commits_count) || 0}</span>个提交
|
||||||
</Link>
|
</Link>
|
||||||
<Link to={`/${owner}/${projectsId}/branchs`} className={pathname.indexOf("/branchs") > 0 ? "active" : ""}>
|
<Link to={`/${owner}/${projectsId}/branches`} className={pathname.indexOf("/branches") > 0 ? "active" : ""}>
|
||||||
<i className="iconfont icon-fenzhi1 font-18 mr3"></i>
|
<i className="iconfont icon-fenzhi1 font-18 mr3"></i>
|
||||||
<span>{(coderCount && coderCount.branches_count) || 0}</span>个分支
|
<span>{(coderCount && coderCount.branches_count) || 0}</span>个分支
|
||||||
</Link>
|
</Link>
|
||||||
<Link to={`/${owner}/${projectsId}/tag`} className={pathname.indexOf("/tag") > 0 ? "active" : ""}>
|
<Link to={`/${owner}/${projectsId}/tags`} className={pathname.indexOf("/tags") > 0 ? "active" : ""}>
|
||||||
<i className="iconfont icon-biaoqian3 font-18 mr3"></i>
|
<i className="iconfont icon-biaoqian3 font-18 mr3"></i>
|
||||||
<span>{(coderCount && coderCount.tags_count) || 0}</span>个标签
|
<span>{(coderCount && coderCount.tags_count) || 0}</span>个标签
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -28,7 +28,7 @@ class IndexItem extends Component {
|
||||||
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
||||||
</a>
|
</a>
|
||||||
:
|
:
|
||||||
<Link to={item.author && item.author.login} className="show-user-link">
|
<Link to={`/${item.author && item.author.login}`} className="show-user-link">
|
||||||
<img className="p-r-photo" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
|
<img className="p-r-photo" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
|
||||||
</Link>
|
</Link>
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,8 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
||||||
{
|
{
|
||||||
item.menu_name === "devops" && platform ?
|
item.menu_name === "devops" && platform ?
|
||||||
<li className={pathname==="devops" ? "active" : ""}>
|
<li className={pathname==="devops" ? "active" : ""}>
|
||||||
<Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}>
|
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
|
||||||
|
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
|
||||||
<i className="iconfont icon-gongzuoliu font-13 mr8"></i>工作流(beta版)
|
<i className="iconfont icon-gongzuoliu font-13 mr8"></i>工作流(beta版)
|
||||||
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
|
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -114,10 +115,10 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
item.menu_name === "setting" &&
|
item.menu_name === "settings" &&
|
||||||
<li className={pathname === "setting" ? "active" : ""}>
|
<li className={pathname === "settings" ? "active" : ""}>
|
||||||
<Link to={`/${owner}/${projectsId}/setting`}>
|
<Link to={`/${owner}/${projectsId}/settings`}>
|
||||||
<i className={url && url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
<i className={url && url.indexOf("/settings") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||||
<span>仓库设置</span>
|
<span>仓库设置</span>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -80,9 +80,10 @@ function Notify(props){
|
||||||
<ul className="notifyList">
|
<ul className="notifyList">
|
||||||
{
|
{
|
||||||
list.map((i,k)=>{
|
list.map((i,k)=>{
|
||||||
|
console.log(i);
|
||||||
return(
|
return(
|
||||||
<li i={k}>
|
<li i={k}>
|
||||||
<Link to={`/${i.login}`}><img src={getImageUrl(`/${i.applied_user && i.applied_user.image_url}`)} alt="" className="notifyImg"/></Link>
|
<Link to={`/${i.applied_user && i.applied_user.login}`}><img src={getImageUrl(`/${i.applied_user && i.applied_user.image_url}`)} alt="" className="notifyImg" /></Link>
|
||||||
<div className="notifyFlex">
|
<div className="notifyFlex">
|
||||||
<p className="notifyInfos">
|
<p className="notifyInfos">
|
||||||
<Link to={`/${i.applied_user && i.applied_user.login}`} className="font-15 mr20">{i.applied_user && i.applied_user.name}</Link>
|
<Link to={`/${i.applied_user && i.applied_user.login}`} className="font-15 mr20">{i.applied_user && i.applied_user.name}</Link>
|
||||||
|
|
|
@ -31,7 +31,7 @@ class OrderItem extends Component {
|
||||||
<div className="milepostwidth">
|
<div className="milepostwidth">
|
||||||
<div className="grid-item width100">
|
<div className="grid-item width100">
|
||||||
<i className="iconfont icon-lubiaosignpost3 font-12 mr3"></i>
|
<i className="iconfont icon-lubiaosignpost3 font-12 mr3"></i>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}`} className="font-16">{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/milestones/${item.id}`} className="font-16">{item.name}</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +65,7 @@ class OrderItem extends Component {
|
||||||
<div className="milepostleft">
|
<div className="milepostleft">
|
||||||
<div className="grid-item ml15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
<Link to={`/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-item ml15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
||||||
|
|
|
@ -52,7 +52,7 @@ class OrderItem extends Component {
|
||||||
{current_user && current_user.login && checkbox}
|
{current_user && current_user.login && checkbox}
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<p className="mb10 df" style={{alignItems:"center"}}>
|
<p className="mb10 df" style={{alignItems:"center"}}>
|
||||||
<Link to={`/${owner}/${projectsId}/issues/${item.id}/detail`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/issues/${item.id}`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link>
|
||||||
{TagInfo(item.priority,"mr10")}
|
{TagInfo(item.priority,"mr10")}
|
||||||
</p>
|
</p>
|
||||||
<p className="color-grey-6 font-12">
|
<p className="color-grey-6 font-12">
|
||||||
|
@ -89,7 +89,7 @@ class OrderItem extends Component {
|
||||||
<li style={{color:`${item.done_ratio === "100%"?"#28BD6C":"#F73030"}`}}>{item.done_ratio || "--"}</li>
|
<li style={{color:`${item.done_ratio === "100%"?"#28BD6C":"#F73030"}`}}>{item.done_ratio || "--"}</li>
|
||||||
<li>
|
<li>
|
||||||
<div className="milepostleft">
|
<div className="milepostleft">
|
||||||
<Link to={`/${owner}/${projectsId}/issues/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link>
|
<Link to={`/${owner}/${projectsId}/issues/${item.id}`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link>
|
||||||
{
|
{
|
||||||
user_admin_or_member ?
|
user_admin_or_member ?
|
||||||
<div style={{ display: orderid === item.id && isdisplay ? 'flex' : 'none' }}>
|
<div style={{ display: orderid === item.id && isdisplay ? 'flex' : 'none' }}>
|
||||||
|
|
|
@ -165,7 +165,7 @@ class order_form extends Component {
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result && result.data.id) {
|
if (result && result.data.id) {
|
||||||
this.props.showNotification("任务创建成功!");
|
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({
|
this.setState({
|
||||||
description: "",
|
description: "",
|
||||||
isSpin: false,
|
isSpin: false,
|
||||||
|
@ -191,7 +191,7 @@ class order_form extends Component {
|
||||||
...values,
|
...values,
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.props.history.push(`/${owner}/${projectsId}/issues/${orderId}/detail`);
|
this.props.history.push(`/${owner}/${projectsId}/issues/${orderId}`);
|
||||||
this.props.showNotification("任务更新成功!");
|
this.props.showNotification("任务更新成功!");
|
||||||
const { getDetail } = this.props;
|
const { getDetail } = this.props;
|
||||||
getDetail && getDetail();
|
getDetail && getDetail();
|
||||||
|
@ -371,7 +371,7 @@ class order_form extends Component {
|
||||||
type="default"
|
type="default"
|
||||||
className="ml30"
|
className="ml30"
|
||||||
onClick={()=>
|
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}`)}
|
||||||
>
|
>
|
||||||
<span className="plr10">取消</span>
|
<span className="plr10">取消</span>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -88,7 +88,7 @@ export default ((props)=>{
|
||||||
|
|
||||||
// 跳转
|
// 跳转
|
||||||
function settingRule(protectBranch){
|
function settingRule(protectBranch){
|
||||||
props.history.push(`/${owner}/${projectsId}/setting/branch/${protectBranch}`);
|
props.history.push(`/${owner}/${projectsId}/settings/branch/${protectBranch}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 翻页
|
// 翻页
|
||||||
|
|
|
@ -290,7 +290,7 @@ export default Form.create()(
|
||||||
<Cancel
|
<Cancel
|
||||||
className="ml30"
|
className="ml30"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(`/${owner}/${projectsId}/setting/branch`);
|
history.push(`/${owner}/${projectsId}/settings/branch`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
取消
|
取消
|
||||||
|
|
|
@ -78,7 +78,7 @@ function CollaboratorGroup({ newGroupId, owner, projectsId , setAddOperation })
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
render: (value, item) => {
|
render: (value, item) => {
|
||||||
if(item.is_admin || item.is_member){
|
if(item.is_admin || item.is_member){
|
||||||
return <Link to={`/${owner}/group/${item.id}`}>{value}</Link>;
|
return <Link to={`/${owner}/teams/${item.id}`}>{value}</Link>;
|
||||||
}else{
|
}else{
|
||||||
return <span>{value}</span>;
|
return <span>{value}</span>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,25 +49,25 @@ class Index extends Component {
|
||||||
const { projectsId , owner } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
const { pathname } = this.props.history.location;
|
const { pathname } = this.props.history.location;
|
||||||
|
|
||||||
const flag = pathname === `/${owner}/${projectsId}/setting`;
|
const flag = pathname === `/${owner}/${projectsId}/settings`;
|
||||||
return (
|
return (
|
||||||
<Box className="ProjectListIndex">
|
<Box className="ProjectListIndex">
|
||||||
<Short>
|
<Short>
|
||||||
<ul className="list-l-Menu">
|
<ul className="list-l-Menu">
|
||||||
<li className={flag ? "active" : ""}>
|
<li className={flag ? "active" : ""}>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/setting`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings`} className="w-100">
|
||||||
<i className="iconfont icon-huabanfuben font-18 mr10"></i>基本设置
|
<i className="iconfont icon-huabanfuben font-18 mr10"></i>基本设置
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={
|
className={
|
||||||
pathname.indexOf("setting/collaborator") > -1 ? "active" : ""
|
pathname.indexOf("settings/collaborators") > -1 ? "active" : ""
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/setting/collaborator`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/collaborators`} className="w-100">
|
||||||
<i className="iconfont icon-chengyuan font-18 mr10"></i>
|
<i className="iconfont icon-chengyuan font-18 mr10"></i>
|
||||||
协作者管理
|
协作者管理
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -75,11 +75,11 @@ class Index extends Component {
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={
|
className={
|
||||||
pathname.indexOf("setting/webhooks") > -1 ? "active" : ""
|
pathname.indexOf("settings/webhooks") > -1 ? "active" : ""
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/setting/webhooks`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="w-100">
|
||||||
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
|
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
|
||||||
Webhooks
|
Webhooks
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -87,21 +87,21 @@ class Index extends Component {
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={
|
className={
|
||||||
pathname.indexOf("setting/branch") > -1 ? "active" : ""
|
pathname.indexOf("settings/branch") > -1 ? "active" : ""
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/setting/branch`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/branch`} className="w-100">
|
||||||
<i className="iconfont icon-fenzhi font-20 mr10"></i>
|
<i className="iconfont icon-fenzhi font-20 mr10"></i>
|
||||||
分支设置
|
分支设置
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={pathname.indexOf("setting/tags") > -1 ? "active" : ""}
|
className={pathname.indexOf("settings/lables") > -1 ? "active" : ""}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/setting/tags`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/lables`} className="w-100">
|
||||||
<i className="iconfont icon-biaoqian3 font-18 mr10 color-grey-6"></i>
|
<i className="iconfont icon-biaoqian3 font-18 mr10 color-grey-6"></i>
|
||||||
项目标签
|
项目标签
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -110,7 +110,7 @@ class Index extends Component {
|
||||||
|
|
||||||
{/* <li
|
{/* <li
|
||||||
className={
|
className={
|
||||||
pathname.indexOf("setting/manage") > -1 ? "active" : ""
|
pathname.indexOf("settings/manage") > -1 ? "active" : ""
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
|
@ -127,64 +127,64 @@ class Index extends Component {
|
||||||
<Switch {...this.props}>
|
<Switch {...this.props}>
|
||||||
{/* webhooks */}
|
{/* webhooks */}
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/webhooks/new"
|
path="/:owner/:projectsId/settings/webhooks/new"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<WebhookNew {...this.props} {...props} {...this.state} />
|
<WebhookNew {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/webhooks/:id"
|
path="/:owner/:projectsId/settings/webhooks/:id"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<WebhookNew {...this.props} {...props} {...this.state} />
|
<WebhookNew {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/webhooks"
|
path="/:owner/:projectsId/settings/webhooks"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<Webhook {...this.props} {...props} {...this.state} />
|
<Webhook {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 协作者 */}
|
{/* 协作者 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/collaborator"
|
path="/:owner/:projectsId/settings/collaborators"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<Collaborator {...this.props} {...props} {...this.state} />
|
<Collaborator {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 修改仓库信息 */}
|
{/* 修改仓库信息 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/tags"
|
path="/:owner/:projectsId/settings/lables"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<Tags {...this.props} {...props} {...this.state} />
|
<Tags {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/branch/:branch"
|
path="/:owner/:projectsId/settings/branch/:branch"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<BranchNew {...this.props} {...props} {...this.state} />
|
<BranchNew {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/branch"
|
path="/:owner/:projectsId/settings/branch"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<Branch {...this.props} {...props } {...this.state} />
|
<Branch {...this.props} {...props } {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/manage/new"
|
path="/:owner/:projectsId/settings/manage/new"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<ManageNew {...this.props} {...props} {...this.state} />
|
<ManageNew {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting/manage"
|
path="/:owner/:projectsId/settings/manage"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<Manage {...this.props} {...props} {...this.state} />
|
<Manage {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 修改仓库信息 */}
|
{/* 修改仓库信息 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:owner/:projectsId/setting"
|
path="/:owner/:projectsId/settings"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<Setting {...this.props} {...props} {...this.state} />
|
<Setting {...this.props} {...props} {...this.state} />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -62,7 +62,7 @@ function Index(props) {
|
||||||
if(total >= 20){
|
if(total >= 20){
|
||||||
return props.showNotification("webhooks数量已到上限!请删除暂不使用的webhooks以进行添加操作");
|
return props.showNotification("webhooks数量已到上限!请删除暂不使用的webhooks以进行添加操作");
|
||||||
}
|
}
|
||||||
props.history.push(`/${owner}/${projectsId}/setting/webhooks/new`)
|
props.history.push(`/${owner}/${projectsId}/settings/webhooks/new`)
|
||||||
}
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
|
@ -90,9 +90,9 @@ function Index(props) {
|
||||||
return(
|
return(
|
||||||
<List.Item key={k}>
|
<List.Item key={k}>
|
||||||
<i className="iconfont icon-a-xuanzhongwebhookicon color-grey-d mr12 font-17"></i>
|
<i className="iconfont icon-a-xuanzhongwebhookicon color-grey-d mr12 font-17"></i>
|
||||||
<Link to={`/${owner}/${projectsId}/setting/webhooks/${i.id}`} className="webName">{i.url}</Link>
|
<Link to={`/${owner}/${projectsId}/settings/webhooks/${i.id}`} className="webName">{i.url}</Link>
|
||||||
<span>
|
<span>
|
||||||
<Button ghost type={"primary"} onClick={()=>{props.history.push(`/${owner}/${projectsId}/setting/webhooks/${i.id}`)}}>编辑</Button>
|
<Button ghost type={"primary"} onClick={()=>{props.history.push(`/${owner}/${projectsId}/settings/webhooks/${i.id}`)}}>编辑</Button>
|
||||||
<Button ghost className="ml20" type="danger" onClick={()=>{deleteFunc(i.id,i.url)}}>删除</Button>
|
<Button ghost className="ml20" type="danger" onClick={()=>{deleteFunc(i.id,i.url)}}>删除</Button>
|
||||||
</span>
|
</span>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
|
|
|
@ -111,7 +111,7 @@ function New({ form , match , showNotification , history }) {
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result){
|
if(result){
|
||||||
showNotification("webhook更新成功!");
|
showNotification("webhook更新成功!");
|
||||||
history.push(`/${owner}/${projectsId}/setting/webhooks`);
|
history.push(`/${owner}/${projectsId}/settings/webhooks`);
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}else{
|
}else{
|
||||||
|
@ -125,7 +125,7 @@ function New({ form , match , showNotification , history }) {
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result && result.data && result.data.id){
|
if(result && result.data && result.data.id){
|
||||||
showNotification("webhook新建成功!");
|
showNotification("webhook新建成功!");
|
||||||
history.push(`/${owner}/${projectsId}/setting/webhooks`);
|
history.push(`/${owner}/${projectsId}/settings/webhooks`);
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ function New({ form , match , showNotification , history }) {
|
||||||
axios.delete(url).then(result=>{
|
axios.delete(url).then(result=>{
|
||||||
if(result){
|
if(result){
|
||||||
showNotification("webhook删除成功!");
|
showNotification("webhook删除成功!");
|
||||||
history.push(`/${owner}/${projectsId}/setting/webhooks`);
|
history.push(`/${owner}/${projectsId}/settings/webhooks`);
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ function New({ form , match , showNotification , history }) {
|
||||||
subTitle={`删除后未来事件将不会推送至此Webhook地址:${data && data.url}`}
|
subTitle={`删除后未来事件将不会推送至此Webhook地址:${data && data.url}`}
|
||||||
/>
|
/>
|
||||||
<Banner>
|
<Banner>
|
||||||
<Link to={`/${owner}/${projectsId}/setting/webhooks`} className="color-blue">Webhooks</Link>
|
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="color-blue">Webhooks</Link>
|
||||||
<i className="iconfont icon-youjiantou ml5 mr5 font-12"></i>
|
<i className="iconfont icon-youjiantou ml5 mr5 font-12"></i>
|
||||||
<span>{id ? "更新" : "添加"}Webhook</span>
|
<span>{id ? "更新" : "添加"}Webhook</span>
|
||||||
</Banner>
|
</Banner>
|
||||||
|
|
|
@ -26,18 +26,18 @@ export default (props)=>{
|
||||||
|
|
||||||
function returnActive (pathname){
|
function returnActive (pathname){
|
||||||
let a = 0;
|
let a = 0;
|
||||||
if(pathname === `/${OIdentifier}/group/${groupId}/setting/member`){
|
if(pathname === `/${OIdentifier}/teams/${groupId}/setting/member`){
|
||||||
a = 1;
|
a = 1;
|
||||||
}else if(pathname === `/${OIdentifier}/group/${groupId}/setting/project`){
|
}else if(pathname === `/${OIdentifier}/teams/${groupId}/setting/project`){
|
||||||
a = 2;
|
a = 2;
|
||||||
}
|
}
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
const active = returnActive(pathname);
|
const active = returnActive(pathname);
|
||||||
const array = {list:[
|
const array = {list:[
|
||||||
{name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/group/${groupId}/setting`},
|
{name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/teams/${groupId}/setting`},
|
||||||
{name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/group/${groupId}/setting/member`},
|
{name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/teams/${groupId}/setting/member`},
|
||||||
{name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/group/${groupId}/setting/project`},
|
{name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/teams/${groupId}/setting/project`},
|
||||||
],
|
],
|
||||||
active
|
active
|
||||||
}
|
}
|
||||||
|
@ -51,19 +51,19 @@ export default (props)=>{
|
||||||
<WhiteBack style={{border:'1px solid #eee'}}>
|
<WhiteBack style={{border:'1px solid #eee'}}>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/group/:groupId/setting/project"
|
path="/:OIdentifier/teams/:groupId/setting/project"
|
||||||
render={() => (
|
render={() => (
|
||||||
<Project {...props} />
|
<Project {...props} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/group/:groupId/setting/member"
|
path="/:OIdentifier/teams/:groupId/setting/member"
|
||||||
render={() => (
|
render={() => (
|
||||||
<Member {...props} />
|
<Member {...props} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/group/:groupId/setting"
|
path="/:OIdentifier/teams/:groupId/setting"
|
||||||
render={() => (
|
render={() => (
|
||||||
<Common {...props} />
|
<Common {...props} />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -119,7 +119,7 @@ export default ((props) => {
|
||||||
<div className="g-tip">
|
<div className="g-tip">
|
||||||
<p>管理员团队对 <span>所有仓库</span> 具有操作权限,且对组织具有 <span>管理员权限</span>。 </p>
|
<p>管理员团队对 <span>所有仓库</span> 具有操作权限,且对组织具有 <span>管理员权限</span>。 </p>
|
||||||
<p>此外,该团队拥有了 <span>创建仓库</span> 的权限:成员可以在组织中创建新的仓库。 </p>
|
<p>此外,该团队拥有了 <span>创建仓库</span> 的权限:成员可以在组织中创建新的仓库。 </p>
|
||||||
{group.is_admin ? <Button type="primary" onClick={()=>props.history.push(`/${OIdentifier}/group/${groupId}/setting`)}><span className="color-white">团队设置</span></Button> : ""}
|
{group.is_admin ? <Button type="primary" onClick={()=>props.history.push(`/${OIdentifier}/teams/${groupId}/setting`)}><span className="color-white">团队设置</span></Button> : ""}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
|
|
|
@ -90,7 +90,7 @@ export default Form.create()(
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
if (result && result.data) {
|
if (result && result.data) {
|
||||||
showNotification("基本设置更新成功!");
|
showNotification("基本设置更新成功!");
|
||||||
history.push(`/${OIdentifier}/group/${groupId}`);
|
history.push(`/${OIdentifier}/teams/${groupId}`);
|
||||||
}
|
}
|
||||||
}).catch(error => { })
|
}).catch(error => { })
|
||||||
} else {
|
} else {
|
||||||
|
@ -101,7 +101,7 @@ export default Form.create()(
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
if (result && result.data) {
|
if (result && result.data) {
|
||||||
showNotification("团队创建成功!");
|
showNotification("团队创建成功!");
|
||||||
history.push(`/${OIdentifier}/group/${result.data.id}`);
|
history.push(`/${OIdentifier}/teams/${result.data.id}`);
|
||||||
}
|
}
|
||||||
}).catch(error => { })
|
}).catch(error => { })
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ export default Form.create()(
|
||||||
|
|
||||||
function cancelEdit(){
|
function cancelEdit(){
|
||||||
if(groupId){
|
if(groupId){
|
||||||
history.push(`/${OIdentifier}/group/${groupId}`);
|
history.push(`/${OIdentifier}/teams/${groupId}`);
|
||||||
}else{
|
}else{
|
||||||
history.push(`/${OIdentifier}`);
|
history.push(`/${OIdentifier}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,34 +36,6 @@ export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(
|
||||||
return (
|
return (
|
||||||
<div className="newMain">
|
<div className="newMain">
|
||||||
<Switch>
|
<Switch>
|
||||||
{/* 组织团队-设置 */}
|
|
||||||
<Route
|
|
||||||
path="/:OIdentifier/group/:groupId/setting"
|
|
||||||
render={(p) => {
|
|
||||||
return <SubDetailIndex {...props} {...p}/>
|
|
||||||
}}
|
|
||||||
></Route>
|
|
||||||
{/* 组织团队-新建 */}
|
|
||||||
<Route
|
|
||||||
path="/:OIdentifier/group/new"
|
|
||||||
render={(p) => {
|
|
||||||
return <GroupNew {...props} {...p}/>
|
|
||||||
}}
|
|
||||||
></Route>
|
|
||||||
{/* 组织团队-子级(包含组织团队列表) */}
|
|
||||||
<Route
|
|
||||||
path="/:OIdentifier/group"
|
|
||||||
render={(p) => {
|
|
||||||
return <DetailIndex {...props} {...p}/>
|
|
||||||
}}
|
|
||||||
></Route>
|
|
||||||
{/* 组织成员 */}
|
|
||||||
<Route
|
|
||||||
path="/:OIdentifier/member"
|
|
||||||
render={(p) => {
|
|
||||||
return <DetailIndex {...props} {...p}/>
|
|
||||||
}}
|
|
||||||
></Route>
|
|
||||||
{/* 新建组织 */}
|
{/* 新建组织 */}
|
||||||
<Route
|
<Route
|
||||||
path="/organize/new"
|
path="/organize/new"
|
||||||
|
@ -71,6 +43,35 @@ export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(
|
||||||
return <New {...props} {...p}/>
|
return <New {...props} {...p}/>
|
||||||
}}
|
}}
|
||||||
></Route>
|
></Route>
|
||||||
|
{/* 组织团队-新建 */}
|
||||||
|
<Route
|
||||||
|
path="/:OIdentifier/teams/new"
|
||||||
|
render={(p) => {
|
||||||
|
return <GroupNew {...props} {...p}/>
|
||||||
|
}}
|
||||||
|
></Route>
|
||||||
|
{/* 组织团队-设置 */}
|
||||||
|
<Route
|
||||||
|
path="/:OIdentifier/teams/:groupId/setting"
|
||||||
|
render={(p) => {
|
||||||
|
return <SubDetailIndex {...props} {...p}/>
|
||||||
|
}}
|
||||||
|
></Route>
|
||||||
|
{/* 组织团队-子级(包含组织团队列表) */}
|
||||||
|
<Route
|
||||||
|
path="/:OIdentifier/teams"
|
||||||
|
render={(p) => {
|
||||||
|
return <DetailIndex {...props} {...p}/>
|
||||||
|
}}
|
||||||
|
></Route>
|
||||||
|
{/* 组织成员 */}
|
||||||
|
<Route
|
||||||
|
path="/:OIdentifier/members"
|
||||||
|
render={(p) => {
|
||||||
|
return <DetailIndex {...props} {...p}/>
|
||||||
|
}}
|
||||||
|
></Route>
|
||||||
|
|
||||||
|
|
||||||
{/* 组织详情(包含组织设置) */}
|
{/* 组织详情(包含组织设置) */}
|
||||||
<Route
|
<Route
|
||||||
|
|
|
@ -68,7 +68,7 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
||||||
<div className="list-r">
|
<div className="list-r">
|
||||||
{
|
{
|
||||||
memberData && memberData.organization_users && memberData.organization_users.length>0 ?
|
memberData && memberData.organization_users && memberData.organization_users.length>0 ?
|
||||||
<Box name="组织成员" count={memberData && memberData.total_count} url={`/${OIdentifier}/member`}>
|
<Box name="组织成员" count={memberData && memberData.total_count} url={`/${OIdentifier}/members`}>
|
||||||
{
|
{
|
||||||
memberData.organization_users.map((item,key)=>{
|
memberData.organization_users.map((item,key)=>{
|
||||||
return(
|
return(
|
||||||
|
@ -93,11 +93,11 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
||||||
<CheckProfile
|
<CheckProfile
|
||||||
showCompeleteDialog={showCompeleteDialog}
|
showCompeleteDialog={showCompeleteDialog}
|
||||||
completeProfile={completeProfile}
|
completeProfile={completeProfile}
|
||||||
sureFunc={()=>history.push(`/${OIdentifier}/group/new`)}
|
sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
|
||||||
className={"ant-btn ant-btn-primary"}
|
className={"ant-btn ant-btn-primary"}
|
||||||
>新建团队</CheckProfile>
|
>新建团队</CheckProfile>
|
||||||
}
|
}
|
||||||
url={`/${OIdentifier}/group`}
|
url={`/${OIdentifier}/teams`}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
groupData && groupData.teams && groupData.teams.length>0?
|
groupData && groupData.teams && groupData.teams.length>0?
|
||||||
|
@ -108,7 +108,7 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
(item.is_admin || item.is_member) ?
|
(item.is_admin || item.is_member) ?
|
||||||
<Link to={`/${OIdentifier}/group/${item.id}`}><ColorListName>{item.name}</ColorListName></Link>
|
<Link to={`/${OIdentifier}/teams/${item.id}`}><ColorListName>{item.name}</ColorListName></Link>
|
||||||
:
|
:
|
||||||
<ColorListName>{item.name}</ColorListName>
|
<ColorListName>{item.name}</ColorListName>
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,11 @@ import { WhiteBack , Banner } from '../../Component/layout';
|
||||||
import GroupItems from '../TeamGroupItems';
|
import GroupItems from '../TeamGroupItems';
|
||||||
|
|
||||||
const limit = 8;
|
const limit = 8;
|
||||||
function TeamSettingGroup({organizeDetail,history}){
|
function TeamSettingGroup({organizeDetail,history,current_user}){
|
||||||
return(
|
return(
|
||||||
<WhiteBack>
|
<WhiteBack>
|
||||||
<Banner>组织团队管理</Banner>
|
<Banner>组织团队管理</Banner>
|
||||||
<GroupItems limit={limit} organizeDetail={organizeDetail} count={4} history={history}/>
|
<GroupItems limit={limit} organizeDetail={organizeDetail} count={4} history={history} current_user={current_user}/>
|
||||||
</WhiteBack>
|
</WhiteBack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ function Detail(props){
|
||||||
}else{
|
}else{
|
||||||
setFlag(true);
|
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);
|
setButtonflagFlag(true);
|
||||||
}else{
|
}else{
|
||||||
setButtonflagFlag(false);
|
setButtonflagFlag(false);
|
||||||
|
@ -88,8 +88,8 @@ function Detail(props){
|
||||||
:""}
|
:""}
|
||||||
{buttonflag &&
|
{buttonflag &&
|
||||||
<span className="subNavs">
|
<span className="subNavs">
|
||||||
<Link to={`/${OIdentifier}/member`} className={pathname ===`/${OIdentifier}/member` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
|
<Link to={`/${OIdentifier}/members`} className={pathname ===`/${OIdentifier}/members` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
|
||||||
<Link to={`/${OIdentifier}/group`} className={pathname ===`/${OIdentifier}/group` ? "active":""}><span>组织团队</span>{detail.num_teams &&<lable>{detail.num_teams}</lable>}</Link>
|
<Link to={`/${OIdentifier}/teams`} className={pathname ===`/${OIdentifier}/teams` ? "active":""}><span>组织团队</span>{detail.num_teams &&<lable>{detail.num_teams}</lable>}</Link>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
@ -112,21 +112,21 @@ function Detail(props){
|
||||||
|
|
||||||
{/* 组织团队-详情 */}
|
{/* 组织团队-详情 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/group/:groupId"
|
path="/:OIdentifier/teams/:groupId"
|
||||||
render={(p) => {
|
render={(p) => {
|
||||||
return <GroupDetails {...props} {...p} group={detail}/>
|
return <GroupDetails {...props} {...p} group={detail}/>
|
||||||
}}
|
}}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 组织成员 */}
|
{/* 组织成员 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/member"
|
path="/:OIdentifier/members"
|
||||||
render={(p) => {
|
render={(p) => {
|
||||||
return <Member {...props} {...p} organizeDetail={detail}/>
|
return <Member {...props} {...p} organizeDetail={detail}/>
|
||||||
}}
|
}}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 组织团队 */}
|
{/* 组织团队 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/group"
|
path="/:OIdentifier/teams"
|
||||||
render={(p) => {
|
render={(p) => {
|
||||||
return <Group {...props} {...p} organizeDetail={detail}/>
|
return <Group {...props} {...p} organizeDetail={detail}/>
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export default ((props)=>{
|
||||||
// 设置页面:顶部不需要设置按钮了
|
// 设置页面:顶部不需要设置按钮了
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(pathname){
|
if(pathname){
|
||||||
if(pathname.indexOf(`/${OIdentifier}/group/${groupId}/setting`)>-1){
|
if(pathname.indexOf(`/${OIdentifier}/teams/${groupId}/setting`)>-1){
|
||||||
setFlag(false);
|
setFlag(false);
|
||||||
}else{
|
}else{
|
||||||
setFlag(true);
|
setFlag(true);
|
||||||
|
@ -55,12 +55,12 @@ export default ((props)=>{
|
||||||
{
|
{
|
||||||
detail &&
|
detail &&
|
||||||
<Cards
|
<Cards
|
||||||
src={`/${OIdentifier}/group/${groupId}`}
|
src={`/${OIdentifier}/teams/${groupId}`}
|
||||||
title={detail.nickname||detail.name}
|
title={detail.nickname||detail.name}
|
||||||
rightBtn={
|
rightBtn={
|
||||||
flag && <span className="subNavs">
|
flag && <span className="subNavs">
|
||||||
<Link to={`/${OIdentifier}/member`} className={pathname ===`/${OIdentifier}/member` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
|
<Link to={`/${OIdentifier}/members`} className={pathname ===`/${OIdentifier}/members` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
|
||||||
<Link to={`/${OIdentifier}/group`} className={pathname ===`/${OIdentifier}/group` ? "active":""}><span>组织团队</span>{detail.num_teams &&<lable>{detail.num_teams}</lable>}</Link>
|
<Link to={`/${OIdentifier}/teams`} className={pathname ===`/${OIdentifier}/teams` ? "active":""}><span>组织团队</span>{detail.num_teams &&<lable>{detail.num_teams}</lable>}</Link>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
desc={!flag && detail.description}
|
desc={!flag && detail.description}
|
||||||
|
@ -69,7 +69,7 @@ export default ((props)=>{
|
||||||
<Switch {...props}>
|
<Switch {...props}>
|
||||||
{/* 组织团队-设置 */}
|
{/* 组织团队-设置 */}
|
||||||
<Route
|
<Route
|
||||||
path="/:OIdentifier/group/:groupId/setting"
|
path="/:OIdentifier/teams/:groupId/setting"
|
||||||
render={(p) => {
|
render={(p) => {
|
||||||
return <GroupSetting {...props} {...p}/>
|
return <GroupSetting {...props} {...p}/>
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -3,11 +3,11 @@ import { Banner } from '../Component/layout';
|
||||||
import GroupItems from './TeamGroupItems';
|
import GroupItems from './TeamGroupItems';
|
||||||
|
|
||||||
const limit = 14;
|
const limit = 14;
|
||||||
function TeamGroup({organizeDetail,history}){
|
function TeamGroup({organizeDetail,history,current_user}){
|
||||||
return(
|
return(
|
||||||
<div style={{background:"#fff",marginBottom:"30px",border:'1px solid #eee'}}>
|
<div style={{background:"#fff",marginBottom:"30px",border:'1px solid #eee'}}>
|
||||||
<Banner>组织团队</Banner>
|
<Banner>组织团队</Banner>
|
||||||
<GroupItems limit={limit} organizeDetail={organizeDetail} count={7} history={history}/>
|
<GroupItems limit={limit} organizeDetail={organizeDetail} count={7} history={history} current_user={current_user}/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ const ImgContent = styled.img`{
|
||||||
border-radius:50%;
|
border-radius:50%;
|
||||||
margin:5px 10px;
|
margin:5px 10px;
|
||||||
}`
|
}`
|
||||||
function TeamGroupItems({organizeDetail,limit, count , history}){
|
function TeamGroupItems({organizeDetail,limit, count , history ,current_user}){
|
||||||
const [ page , setPage ] = useState(1);
|
const [ page , setPage ] = useState(1);
|
||||||
const [ isSpin , setIsSpin ] = useState(true);
|
const [ isSpin , setIsSpin ] = useState(true);
|
||||||
const [ total , setTotal ] = useState(0);
|
const [ total , setTotal ] = useState(0);
|
||||||
|
@ -48,12 +48,13 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
||||||
axios.delete(url).then(result =>{
|
axios.delete(url).then(result =>{
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
getData();
|
getData();
|
||||||
|
history.push(`/${current_user && current_user.login}`);
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
// 团队设置
|
// 团队设置
|
||||||
function toGroupSetting(id){
|
function toGroupSetting(id){
|
||||||
history.push(`/${organizeDetail && organizeDetail.name}/group/${id}/setting`);
|
history.push(`/${organizeDetail && organizeDetail.name}/teams/${id}/setting`);
|
||||||
}
|
}
|
||||||
// 解散团队
|
// 解散团队
|
||||||
function disMissGroup(id){
|
function disMissGroup(id){
|
||||||
|
@ -77,7 +78,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
||||||
<p className="g-head">
|
<p className="g-head">
|
||||||
{
|
{
|
||||||
(item.is_admin || item.is_member) ?
|
(item.is_admin || item.is_member) ?
|
||||||
<Link to={`/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.nickname}</Link>
|
<Link to={`/${organizeDetail.name}/teams/${item.id}`} className="color-grey-3 font-16">{item.nickname}</Link>
|
||||||
:
|
:
|
||||||
<span className="color-grey-3 font-16">{item.nickname}</span>
|
<span className="color-grey-3 font-16">{item.nickname}</span>
|
||||||
}
|
}
|
||||||
|
@ -94,7 +95,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
||||||
k < count ? <Link to={`/${i.login}`}><ImgContent title={i.name} key={k} src={getImageUrl(`/${i.image_url}`)}/></Link>
|
k < count ? <Link to={`/${i.login}`}><ImgContent title={i.name} key={k} src={getImageUrl(`/${i.image_url}`)}/></Link>
|
||||||
:
|
:
|
||||||
k === count ?
|
k === count ?
|
||||||
<Link to={`/${organizeDetail && organizeDetail.name}/group/${item.id}`} className="moreMember" title="查看更多" ><i className="iconfont icon-zhunbeizhong"></i></Link>
|
<Link to={`/${organizeDetail && organizeDetail.name}/teams/${item.id}`} className="moreMember" title="查看更多" ><i className="iconfont icon-zhunbeizhong"></i></Link>
|
||||||
:""
|
:""
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
@ -62,7 +62,7 @@ function CIList(props){
|
||||||
return(
|
return(
|
||||||
<li key={key}>
|
<li key={key}>
|
||||||
<span>
|
<span>
|
||||||
<Link to={`/${item.author && item.author.login}/${item.identifier}${ item.open_devops ? "/devops/dispose":""}`}>{item.name}</Link>
|
<Link to={`/${item.author && item.author.login}/${item.identifier}${ item.open_devops ? "/devops":""}`}>{item.name}</Link>
|
||||||
{ item.open_devops ?
|
{ item.open_devops ?
|
||||||
<span className="authTag green ml20">已激活</span>
|
<span className="authTag green ml20">已激活</span>
|
||||||
:
|
:
|
||||||
|
|
|
@ -11,10 +11,10 @@ function Activity({list}) {
|
||||||
list.map((i,k)=>{
|
list.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<Link to={``}><img src={getImageUrl(`/system/lets/letter_avatars/2/D/169_162_140/120.png`)} alt="" className="aImg"/></Link>
|
<Link to={`/${i.user_login}`}><img src={getImageUrl(`/system/lets/letter_avatars/2/D/169_162_140/120.png`)} alt="" className="aImg"/></Link>
|
||||||
<div className="aInfos">
|
<div className="aInfos">
|
||||||
<AlignCenter>
|
<AlignCenter>
|
||||||
<Link to={``} className="name">{i.user_name}</Link>
|
<Link to={`/${i.user_login}`} className="name">{i.user_name}</Link>
|
||||||
<span className="time">{i.action_time}</span>
|
<span className="time">{i.action_time}</span>
|
||||||
{i.priority && TagInfo(`${i.priority}`,"")}
|
{i.priority && TagInfo(`${i.priority}`,"")}
|
||||||
{i.issue_status && <span className="status">{i.issue_status}</span> }
|
{i.issue_status && <span className="status">{i.issue_status}</span> }
|
||||||
|
|
|
@ -10,11 +10,6 @@ const Infos = Loadable({
|
||||||
loader: () => import("./Infos"),
|
loader: () => import("./Infos"),
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
});
|
});
|
||||||
//forge项目
|
|
||||||
// const Projects = Loadable({
|
|
||||||
// loader: () => import('../Index'),
|
|
||||||
// loading: Loading,
|
|
||||||
// })
|
|
||||||
// forge项目详情
|
// forge项目详情
|
||||||
const ProjectDetail = Loadable({
|
const ProjectDetail = Loadable({
|
||||||
loader: () => import("../Main/Detail"),
|
loader: () => import("../Main/Detail"),
|
||||||
|
@ -25,20 +20,10 @@ export default withRouter(
|
||||||
|
|
||||||
// 个人中心新增的二级目录都需在此添加一次。将项目放组织和个人名下后,此处根据二级目录作判断,
|
// 个人中心新增的二级目录都需在此添加一次。将项目放组织和个人名下后,此处根据二级目录作判断,
|
||||||
let secondRouter = '';
|
let secondRouter = '';
|
||||||
let firstRouter = '';
|
|
||||||
if (props.location.pathname) {
|
if (props.location.pathname) {
|
||||||
firstRouter =props.location.pathname.split('/')[1];
|
|
||||||
secondRouter = props.location.pathname.split('/')[2];
|
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'];
|
let userRouterArr = ['statistics', 'projects', 'notice', 'devops', 'organizes', 'info', 'watchers', 'fan_users', 'password'];
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Switch>
|
||||||
|
@ -51,7 +36,7 @@ export default withRouter(
|
||||||
></Route> : <Route
|
></Route> : <Route
|
||||||
path="/:username"
|
path="/:username"
|
||||||
render={(p) => (
|
render={(p) => (
|
||||||
<Infos {...changePathProps} {...p} />
|
<Infos {...props} {...p} />
|
||||||
)}
|
)}
|
||||||
></Route>}
|
></Route>}
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,7 @@ class Infos extends Component {
|
||||||
<Menu selectedKeys={[menuKey]} mode={`horizontal`} className="infosRightMenu">
|
<Menu selectedKeys={[menuKey]} mode={`horizontal`} className="infosRightMenu">
|
||||||
<Menu.Item key="0"><Link to={`/${user && user.login}`}><i className="iconfont icon-gailan"></i>概览</Link></Menu.Item>
|
<Menu.Item key="0"><Link to={`/${user && user.login}`}><i className="iconfont icon-gailan"></i>概览</Link></Menu.Item>
|
||||||
<Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i>数据统计</Link></Menu.Item>
|
<Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i>数据统计</Link></Menu.Item>
|
||||||
<Menu.Item key="2"><Link to={`/${user && user.login}/projects/common`}><i className="iconfont icon-xiangmu"></i>项目</Link></Menu.Item>
|
<Menu.Item key="2"><Link to={`/${user && user.login}/projects`}><i className="iconfont icon-xiangmu"></i>项目</Link></Menu.Item>
|
||||||
{
|
{
|
||||||
current_user && user && user.login === current_user.login ?
|
current_user && user && user.login === current_user.login ?
|
||||||
<Menu.Item key="3">
|
<Menu.Item key="3">
|
||||||
|
@ -338,7 +338,7 @@ class Infos extends Component {
|
||||||
}}
|
}}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path="/:username/projects/:project_type"
|
path="/:username/projects" // /:project_type
|
||||||
render={() => {
|
render={() => {
|
||||||
return <InfosUser {...this.props} {...this.state} />;
|
return <InfosUser {...this.props} {...this.state} />;
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -10,11 +10,6 @@ import './index.scss';
|
||||||
const { Search } = Input;
|
const { Search } = Input;
|
||||||
const { TabPane } = Tabs;
|
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 GlobalSearch = ({ location, showNotification, history }) => {
|
||||||
|
|
||||||
const size = 10;
|
const size = 10;
|
||||||
|
@ -58,6 +53,8 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchDataList() {
|
function searchDataList() {
|
||||||
|
let chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
||||||
|
let https = chromesettingArray.common.search || 'https://statistics.trustie.net';
|
||||||
const url = https + '/search';
|
const url = https + '/search';
|
||||||
if (!term) {
|
if (!term) {
|
||||||
// showNotification('请输入关键字');
|
// showNotification('请输入关键字');
|
||||||
|
|
Loading…
Reference in New Issue