diff --git a/src/forge/DevOps/Dispose.jsx b/src/forge/DevOps/Dispose.jsx index 56e6f388..1b4f8bac 100644 --- a/src/forge/DevOps/Dispose.jsx +++ b/src/forge/DevOps/Dispose.jsx @@ -15,6 +15,7 @@ function Dispose(props){ const [ first , setFirst ] = useState(false); let projectsId = props.match.params.projectsId; + let owner = props.match.params.owner; useEffect(()=>{ if(projectsId){ @@ -71,7 +72,7 @@ function Dispose(props){ } if(first){ // 为true,则是编辑否则是新建 - url = `/repositories/${projectsId}/update_file.json`; + url = `/${owner}/${projectsId}/update_file.json`; axios.put(url,{ ...params, sha:info && info.sha @@ -83,7 +84,7 @@ function Dispose(props){ console.log(error); }) }else{ - url = `/repositories/${projectsId}/create_file.json`; + url = `/${owner}/${projectsId}/create_file.json`; axios.post(url,params).then(result=>{ if(result){ setVisible(true); @@ -94,7 +95,7 @@ function Dispose(props){ } } function suresubmit(){ - props.history.push(`/projects/${projectsId}/ops/list`); + props.history.push(`/projects/${owner}/${projectsId}/ops/list`); } return( diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js index 34224ac4..f2fe27b3 100644 --- a/src/forge/Main/CoderRootBranch.js +++ b/src/forge/Main/CoderRootBranch.js @@ -32,7 +32,7 @@ export default ((props)=>{ return(
{item.last_commit && truncateCommitId(item.last_commit.sha)} {item.last_commit && item.last_commit.message} diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index 0d79eaa1..40d9081d 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -95,7 +95,7 @@ class CoderRootDirectory extends Component { this.setState({ readOnly:true }) - this.props.history.push(`/projects/${owner}/${projectsId}/coders`); + this.props.history.push(`/projects/${owner}/${projectsId}`); this.getProjectRoot(branch); }; @@ -132,7 +132,7 @@ class CoderRootDirectory extends Component { ChangeFile = (arr, readOnly) => { const { projectsId , owner } = this.props.match.params; //点击直接跳转页面 加载一次路由 - this.props.history.push(`/projects/${owner}/${projectsId}/coders?url=${arr.path}`); + this.props.history.push(`/projects/${owner}/${projectsId}?url=${arr.path}`); this.setState({ readOnly: readOnly, chooseType:"file" @@ -163,7 +163,7 @@ class CoderRootDirectory extends Component { const { projectsId , owner } = this.props.match.params; //点击直接跳转页面 加载一次路由 this.props.history.push( - `/projects/${owner}/${projectsId}/coders?url=${str.substr(1)}` + `/projects/${owner}/${projectsId}?url=${str.substr(1)}` ); } else { list.push({ @@ -247,7 +247,7 @@ class CoderRootDirectory extends Component { chooseType:type }) const { projectsId, owner } = this.props.match.params; - this.props.history.push(`/projects/${owner}/${projectsId}/coders?url=${path}`); + this.props.history.push(`/projects/${owner}/${projectsId}?url=${path}`); if(filename.substring(filename.length - 3) === ".md"){ this.setState({ md:true @@ -330,7 +330,7 @@ class CoderRootDirectory extends Component { readOnly:true }) const { projectsId , owner } = this.props.match.params; - this.props.history.push(`/projects/${owner}/${projectsId}/coders?url=${url}`); + this.props.history.push(`/projects/${owner}/${projectsId}?url=${url}`); } onEdit=(readOnly)=>{ @@ -478,13 +478,13 @@ class CoderRootDirectory extends Component { {subFileType && (projectDetail && parseInt(projectDetail.type)) !== 2 && (isManager || isDeveloper) && (
- 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.commits_count) || 0}个提交 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.branches_count) || 0}个分支 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.tags_count) || 0}个标签 - 0 ? "active" : ""}> + 0 ? "active" : ""}> {(coderCount && coderCount.version_releasesed_count) || 0}个发行版 diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 3c76e16a..1195ebbb 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -25,7 +25,7 @@ class IndexItem extends Component {