Fix:Issues

This commit is contained in:
sylor_huang@126.com 2020-08-21 11:29:05 +08:00
commit 3f78ed249c
19 changed files with 93 additions and 82 deletions

View File

@ -15,6 +15,7 @@ function Dispose(props){
const [ first , setFirst ] = useState(false); const [ first , setFirst ] = useState(false);
let projectsId = props.match.params.projectsId; let projectsId = props.match.params.projectsId;
let owner = props.match.params.owner;
useEffect(()=>{ useEffect(()=>{
if(projectsId){ if(projectsId){
@ -71,7 +72,7 @@ function Dispose(props){
} }
if(first){ if(first){
// true // true
url = `/repositories/${projectsId}/update_file.json`; url = `/${owner}/${projectsId}/update_file.json`;
axios.put(url,{ axios.put(url,{
...params, ...params,
sha:info && info.sha sha:info && info.sha
@ -83,7 +84,7 @@ function Dispose(props){
console.log(error); console.log(error);
}) })
}else{ }else{
url = `/repositories/${projectsId}/create_file.json`; url = `/${owner}/${projectsId}/create_file.json`;
axios.post(url,params).then(result=>{ axios.post(url,params).then(result=>{
if(result){ if(result){
setVisible(true); setVisible(true);
@ -94,7 +95,7 @@ function Dispose(props){
} }
} }
function suresubmit(){ function suresubmit(){
props.history.push(`/projects/${projectsId}/ops/list`); props.history.push(`/projects/${owner}/${projectsId}/ops/list`);
} }
return( return(

View File

@ -32,7 +32,7 @@ export default ((props)=>{
return( return(
<li key={key}> <li key={key}>
<div> <div>
<Link to={`/projects/${owner}/${projectsId}/coders?branch=${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link> <Link to={`/projects/${owner}/${projectsId}?branch=${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
<p className="f-wrap-alignCenter mt15"> <p className="f-wrap-alignCenter mt15">
<span className="mr5 commitKey" style={{marginLeft:0}}>{item.last_commit && truncateCommitId(item.last_commit.sha)}</span> <span className="mr5 commitKey" style={{marginLeft:0}}>{item.last_commit && truncateCommitId(item.last_commit.sha)}</span>
<span className="color-grey-3 hide-1 messages leftPoint">{item.last_commit && item.last_commit.message}</span> <span className="color-grey-3 hide-1 messages leftPoint">{item.last_commit && item.last_commit.message}</span>

View File

@ -95,7 +95,7 @@ class CoderRootDirectory extends Component {
this.setState({ this.setState({
readOnly:true readOnly:true
}) })
this.props.history.push(`/projects/${owner}/${projectsId}/coders`); this.props.history.push(`/projects/${owner}/${projectsId}`);
this.getProjectRoot(branch); this.getProjectRoot(branch);
}; };
@ -132,7 +132,7 @@ class CoderRootDirectory extends Component {
ChangeFile = (arr, readOnly) => { ChangeFile = (arr, readOnly) => {
const { projectsId , owner } = this.props.match.params; 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({ this.setState({
readOnly: readOnly, readOnly: readOnly,
chooseType:"file" chooseType:"file"
@ -163,7 +163,7 @@ class CoderRootDirectory extends Component {
const { projectsId , owner } = this.props.match.params; const { projectsId , owner } = this.props.match.params;
//点击直接跳转页面 加载一次路由 //点击直接跳转页面 加载一次路由
this.props.history.push( this.props.history.push(
`/projects/${owner}/${projectsId}/coders?url=${str.substr(1)}` `/projects/${owner}/${projectsId}?url=${str.substr(1)}`
); );
} else { } else {
list.push({ list.push({
@ -247,7 +247,7 @@ class CoderRootDirectory extends Component {
chooseType:type chooseType:type
}) })
const { projectsId, owner } = this.props.match.params; 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"){ if(filename.substring(filename.length - 3) === ".md"){
this.setState({ this.setState({
md:true md:true
@ -330,7 +330,7 @@ class CoderRootDirectory extends Component {
readOnly:true readOnly:true
}) })
const { projectsId , owner } = this.props.match.params; 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)=>{ onEdit=(readOnly)=>{
@ -478,13 +478,13 @@ class CoderRootDirectory extends Component {
{subFileType && (projectDetail && parseInt(projectDetail.type)) !== 2 && (isManager || isDeveloper) && ( {subFileType && (projectDetail && parseInt(projectDetail.type)) !== 2 && (isManager || isDeveloper) && (
<div> <div>
<span> <span>
<Link to={`/projects/${owner}/${projectsId}/coders/${branch}/uploadfile${urlRoot}`} > <Link to={`/projects/${owner}/${projectsId}/${branch}/uploadfile${urlRoot}`} >
<span className="color-green mr30">上传文件</span> <span className="color-green mr30">上传文件</span>
</Link> </Link>
</span> </span>
<span className="mr30"> <span className="mr30">
<Link <Link
to={`/projects/${owner}/${projectsId}/coders/${branch}/newfile${urlRoot}`} to={`/projects/${owner}/${projectsId}/${branch}/newfile${urlRoot}`}
> >
<span className="color-blue">新建文件</span> <span className="color-blue">新建文件</span>
</Link> </Link>

View File

@ -82,22 +82,22 @@ class CoderRootIndex extends Component{
<Top {...this.props} {...this.state}/> <Top {...this.props} {...this.state}/>
<Switch {...this.props}> <Switch {...this.props}>
{/* 新建文件 */} {/* 新建文件 */}
<Route path="/projects/:owner/:projectsId/coders/:branch/newfile/:path" <Route path="/projects/:owner/:projectsId/:branch/newfile/:path"
render={ render={
(props) => (<FileNew {...this.props} {...props} {...this.state} />) (props) => (<FileNew {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/:branch/uploadfile" <Route path="/projects/:owner/:projectsId/:branch/uploadfile"
render={ render={
(props) => (<UploadFile {...this.props} {...props} {...this.state} />) (props) => (<UploadFile {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/:branch/newfile" <Route path="/projects/:owner/:projectsId/:branch/newfile"
render={ render={
(props) => (<FileNew {...this.props} {...props} {...this.state} getTopCount={this.getTopCount} />) (props) => (<FileNew {...this.props} {...props} {...this.state} getTopCount={this.getTopCount} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/commits" <Route path="/projects/:owner/:projectsId/commits"
render={ render={
() => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" getTopCount={this.getTopCount} />) () => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" getTopCount={this.getTopCount} />)
} }
@ -108,38 +108,33 @@ class CoderRootIndex extends Component{
() => (<Diff {...this.props} {...this.state}/>) () => (<Diff {...this.props} {...this.state}/>)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/releases/new"
<Route path="/projects/:owner/:projectsId/releases/:versionId/update"
render={
(props) => (<CoderRootVersionUpdate {...this.props} {...this.state} {...props} />)
}
></Route>
<Route path="/projects/:owner/:projectsId/releases/new"
render={ render={
() => (<CoderRootVersionNew {...this.props} {...this.state} />) () => (<CoderRootVersionNew {...this.props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/releases/:versionId/update" <Route path="/projects/:owner/:projectsId/releases"
render={
(props) => (<CoderRootVersionUpdate {...this.props} {...this.state} {...props} />)
}
></Route>
<Route path="/projects/:owner/:projectsId/coders/releases"
render={ render={
() => (<CoderRootVersion {...this.props} {...this.state} />) () => (<CoderRootVersion {...this.props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/tag" <Route path="/projects/:owner/:projectsId/tag"
render={ render={
() => (<CoderRootTag {...this.props} {...this.state} />) () => (<CoderRootTag {...this.props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders/branch" <Route path="/projects/:owner/:projectsId/branch"
render={ render={
() => (<CoderRootBranch {...this.props} {...this.state} />) () => (<CoderRootBranch {...this.props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders"
render={
() => (<CoderRootDirectory {...this.props} {...this.state} getTopCount={this.getTopCount} />)
}
></Route>
<Route path="/projects/:owner/:projectsId" <Route path="/projects/:owner/:projectsId"
render={ render={
() => (<CoderRootDirectory {...this.props} {...this.state} getTopCount={this.getTopCount} />) () => (<CoderRootDirectory {...this.props} {...this.state} getTopCount={this.getTopCount} />)

View File

@ -121,7 +121,23 @@ const DevIndex = Loadable({
/** /**
* permissionManager:管理员Reporter报告人员(只有读取权限)Developer开发人员除不能设置仓库信息外 * permissionManager:管理员Reporter报告人员(只有读取权限)Developer开发人员除不能设置仓库信息外
*/ */
function checkPathname(pathname){
let name = "";
if(pathname){
if(pathname.indexOf("/issues")>-1 ||pathname.indexOf("Milepost") > 0){
name = "issues";
}else if(pathname.indexOf("/pulls")>-1){
name="pulls"
}else if(pathname.indexOf("/milestones")>-1){
name="milestones"
}else if(pathname.indexOf("/activity")>-1){
name="activity"
}else if(pathname.indexOf("/setting")>-1){
name="setting"
}
}
return name;
}
class Detail extends Component { class Detail extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -295,7 +311,7 @@ class Detail extends Component {
const url = `/${owner}/${projectsId}/forks.json`; const url = `/${owner}/${projectsId}/forks.json`;
axios.post(url).then(result => { axios.post(url).then(result => {
if (result && result.data.status === 0) { if (result && result.data.status === 0) {
this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}/coders`); this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}`);
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
} }
}).catch(error => { }).catch(error => {
@ -318,11 +334,14 @@ class Detail extends Component {
}) })
} }
render() { render() {
const { projectDetail, watchers_count, praises_count, forked_count, firstSync , secondSync , isManager, watched, praised, project } = this.state; const { projectDetail, watchers_count, praises_count, forked_count, firstSync , secondSync , isManager, watched, praised, project } = this.state;
const url = this.props.history.location.pathname; const url = this.props.history.location.pathname;
const urlArr = url.split("/"); const urlArr = url.split("/");
const urlFlag = (urlArr.length === 3); const urlFlag = (urlArr.length === 3);
let pathname = checkPathname(url);
const { projectsId , owner } = this.props.match.params; const { projectsId , owner } = this.props.match.params;
@ -336,9 +355,10 @@ class Detail extends Component {
<span>forked from </span> <span>forked from </span>
<Link to={`/users/${projectDetail.fork_info.fork_project_user_login}`} className="show-user-link color-grey-ccc">{projectDetail.fork_info.fork_project_user_name}</Link> <Link to={`/users/${projectDetail.fork_info.fork_project_user_login}`} className="show-user-link color-grey-ccc">{projectDetail.fork_info.fork_project_user_name}</Link>
<span> / </span> <span> / </span>
<Link to={`/projects/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}/coders`} className="color-grey-ccc">{projectDetail.fork_info.fork_form_name}</Link> <Link to={`/projects/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}`} className="color-grey-ccc">{projectDetail.fork_info.fork_form_name}</Link>
</React.Fragment> : "" </React.Fragment> : ""
); );
const common = { const common = {
getDetail: this.getDetail getDetail: this.getDetail
@ -356,11 +376,11 @@ class Detail extends Component {
} }
<span className="ml5 mr5">/</span> <span className="ml5 mr5">/</span>
<span className="hide-1 flex-1 df"> <span className="hide-1 flex-1 df">
<Link to={`/projects/${owner}/${projectsId}/coders`} className="color-white font-22">{project && project.name}</Link> <Link to={`/projects/${owner}/${projectsId}`} className="color-white font-22">{project && project.name}</Link>
{ {
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
<Tooltip placement={'right'} title={text}> <Tooltip placement={'right'} title={text}>
<Link to={`/projects/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}/coders`} <Link to={`/projects/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}`}
className="ml10" > className="ml10" >
<i className="iconfont icon-fork font-18 fl mt6" style={{ color: "#8D90E3" }}></i> <i className="iconfont icon-fork font-18 fl mt6" style={{ color: "#8D90E3" }}></i>
</Link> </Link>
@ -418,12 +438,12 @@ class Detail extends Component {
firstSync ? "" : firstSync ? "" :
<div className="f-wrap-between pb20"> <div className="f-wrap-between pb20">
<ul className="headerMenu-wrapper"> <ul className="headerMenu-wrapper">
<li className={(url.indexOf("coders") > -1 || urlFlag) ? "active" : ""}> <li className={(pathname==="" || urlFlag) ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/coders`, state }}> <Link to={{ pathname: `/projects/${owner}/${projectsId}`, state }}>
<img alt="" src={img_1} width="18" />代码库 <img alt="" src={img_1} width="18" />代码库
</Link> </Link>
</li> </li>
<li className={(url.indexOf("/issues") > -1 && !(url.indexOf("Milepost") > 0 || url.indexOf("meilpost") > 0 || url.indexOf("tags") > 0)) ? "active" : ""}> <li className={pathname==="issues" ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}> <Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
<img alt="" src={img_2} width="12" />任务 <img alt="" src={img_2} width="12" />任务
{projectDetail && projectDetail.issues_count ? <span>{projectDetail.issues_count}</span> : ""} {projectDetail && projectDetail.issues_count ? <span>{projectDetail.issues_count}</span> : ""}
@ -431,7 +451,7 @@ class Detail extends Component {
</li> </li>
{ {
projectDetail && parseInt(projectDetail.type) !== 2 && projectDetail && parseInt(projectDetail.type) !== 2 &&
<li className={url.indexOf("pulls") > -1 ? "active" : ""}> <li className={pathname==="pulls" ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/pulls`, state }}> <Link to={{ pathname: `/projects/${owner}/${projectsId}/pulls`, state }}>
<img alt="" src={img_3} width="13" />合并请求 <img alt="" src={img_3} width="13" />合并请求
{projectDetail && projectDetail.pull_requests_count ? <span>{projectDetail.pull_requests_count}</span> : ""} {projectDetail && projectDetail.pull_requests_count ? <span>{projectDetail.pull_requests_count}</span> : ""}
@ -444,13 +464,13 @@ class Detail extends Component {
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""} {projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
</Link> </Link>
</li> */} </li> */}
<li className={url.indexOf("/milestones") > -1 ? "active" : ""}> <li className={pathname==="milestones" ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/milestones`, state }}> <Link to={{ pathname: `/projects/${owner}/${projectsId}/milestones`, state }}>
<img alt="" src={img_milepost} width="16" />里程碑 <img alt="" src={img_milepost} width="16" />里程碑
{projectDetail && projectDetail.versions_count ? <span>{projectDetail.versions_count}</span> :""} {projectDetail && projectDetail.versions_count ? <span>{projectDetail.versions_count}</span> :""}
</Link> </Link>
</li> </li>
<li className={url.indexOf("/activity") > -1 ? "active" : ""}> <li className={pathname==="activity" ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/activity`, state }}> <Link to={{ pathname: `/projects/${owner}/${projectsId}/activity`, state }}>
<img alt="" src={img_6} width="16" />动态 <img alt="" src={img_6} width="16" />动态
</Link> </Link>
@ -588,11 +608,6 @@ class Detail extends Component {
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common} />) (props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route path="/projects/:owner/:projectsId/coders"
render={
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route path="/projects/:owner/:projectsId/watchers" <Route path="/projects/:owner/:projectsId/watchers"
render={ render={
(props) => (<WatchUsers {...this.props} {...props} {...this.state} {...common} />) (props) => (<WatchUsers {...this.props} {...props} {...this.state} {...common} />)

View File

@ -8,19 +8,19 @@ class DetailTop extends Component {
const { pathname } = this.props.location; const { pathname } = this.props.location;
return ( return (
<p className="branch-wrapper"> <p className="branch-wrapper">
<Link to={`/projects/${owner}/${projectsId}/coders/commits`} className={pathname.indexOf("/coders/commits") > 0 ? "active" : ""}> <Link to={`/projects/${owner}/${projectsId}/commits`} className={pathname.indexOf("/commits") > 0 ? "active" : ""}>
<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={`/projects/${owner}/${projectsId}/coders/branch`} className={pathname.indexOf("/coders/branch") > 0 ? "active" : ""}> <Link to={`/projects/${owner}/${projectsId}/branch`} className={pathname.indexOf("/branch") > 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={`/projects/${owner}/${projectsId}/coders/tag`} className={pathname.indexOf("/coders/tag") > 0 ? "active" : ""}> <Link to={`/projects/${owner}/${projectsId}/tag`} className={pathname.indexOf("/tag") > 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>
<Link to={`/projects/${owner}/${projectsId}/coders/releases`} className={pathname.indexOf("/coders/releases") > 0 ? "active" : ""}> <Link to={`/projects/${owner}/${projectsId}/releases`} className={pathname.indexOf("/releases") > 0 ? "active" : ""}>
<i className="iconfont icon-fahangban font-18 mr3"></i> <i className="iconfont icon-fahangban font-18 mr3"></i>
<span>{(coderCount && coderCount.version_releasesed_count) || 0}</span> <span>{(coderCount && coderCount.version_releasesed_count) || 0}</span>
</Link> </Link>

View File

@ -25,7 +25,7 @@ class IndexItem extends Component {
</Link> </Link>
<div className="p-r-Infos"> <div className="p-r-Infos">
<div className="p-r-name"> <div className="p-r-name">
<Link to={`/projects/${item.author.login}/${item.identifier}/coders`} className="hide-1 color-grey-3 font-18 task-hide " style={{ whiteSpace: "wrap", display: 'flex', width: 400 }}> <Link to={`/projects/${item.author.login}/${item.identifier}`} className="hide-1 color-grey-3 font-18 task-hide " style={{ whiteSpace: "wrap", display: 'flex', width: 400 }}>
{item.author.name}/{item.name} {item.author.name}/{item.name}
{ {
item.forked_from_project_id ? item.forked_from_project_id ?

View File

@ -98,7 +98,7 @@ class MergeItem extends Component {
<span className="ml15"> <span className="ml15">
<Tag className="pr-branch-tag"> <Tag className="pr-branch-tag">
<Link <Link
to={`/projects/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/coders?branch=${item.pull_request_head}`} to={`/projects/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }?branch=${item.pull_request_head}`}
className="maxW200px hide-1 ver-middle" className="maxW200px hide-1 ver-middle"
> >
{item.is_original {item.is_original
@ -116,7 +116,7 @@ class MergeItem extends Component {
</span> </span>
<Tag className="pr-branch-tag"> <Tag className="pr-branch-tag">
<Link <Link
to={`/projects/${projectsId}/coders?branch=${item.pull_request_base}`} to={`/projects/${owner}/${projectsId}?branch=${item.pull_request_base}`}
className="maxW200px hide-1 ver-middle" className="maxW200px hide-1 ver-middle"
> >
{/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */} {/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */}
@ -156,7 +156,7 @@ class MergeItem extends Component {
{item.journals_count ? ( {item.journals_count ? (
<Link <Link
className="mr5 color-grey-8" className="mr5 color-grey-8"
to={`/projects/${projectsId}/pulls/${item.pull_request_id}/Messagecount`} to={`/projects/${owner}/${projectsId}/pulls/${item.pull_request_id}/Messagecount`}
> >
<i className="iconfont icon-huifu1 font-15 mr5 ver-middle"></i> <i className="iconfont icon-huifu1 font-15 mr5 ver-middle"></i>
{item.journals_count} {item.journals_count}
@ -177,7 +177,7 @@ class MergeItem extends Component {
> >
<div className="grid-item mr15 color-grey-9"> <div className="grid-item mr15 color-grey-9">
<Link <Link
to={`/projects/${projectsId}/merge/${item.pull_request_id}/updatemerge`} to={`/projects/${owner}/${projectsId}/merge/${item.pull_request_id}/updatemerge`}
className="color-grey-9" className="color-grey-9"
> >
<i className="iconfont icon-bianji3 font-14 mr5"></i> <i className="iconfont icon-bianji3 font-14 mr5"></i>

View File

@ -37,8 +37,8 @@ class MergeSubmit extends Component{
getDetail=()=>{ getDetail=()=>{
const { projectsId , mergeId} = this.props.match.params; const { projectsId , mergeId, owner} = this.props.match.params;
const url = `/projects/${projectsId}/pull_requests/${mergeId}.json`; const url = `/projects/${owner}/${projectsId}/pull_requests/${mergeId}.json`;
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -53,8 +53,8 @@ class MergeSubmit extends Component{
//获取提交列表 //获取提交列表
getCommitList=(branch , page , limit)=>{ getCommitList=(branch , page , limit)=>{
const { projectsId } = this.props.match.params; const { projectsId , owner } = this.props.match.params;
const url = `/repositories/${projectsId}/commits.json`; const url = `/${owner}/${projectsId}/commits.json`;
axios.get(url,{ axios.get(url,{
params:{ params:{
sha:branch, sha:branch,

View File

@ -258,7 +258,7 @@ class MessageCount extends Component {
<div className="mt15"> <div className="mt15">
<Tag className="pr-branch-tag"> <Tag className="pr-branch-tag">
<Link <Link
to={`/projects/${owner}/${data.pull_request.is_original?data.pull_request.fork_project_id:projectsId}/coders?branch=${data.pull_request.head}`} to={`/projects/${owner}/${data.pull_request.is_original?data.pull_request.fork_project_id:projectsId}?branch=${data.pull_request.head}`}
className="ver-middle" className="ver-middle"
> >
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}:{data.pull_request.head} {data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}:{data.pull_request.head}
@ -273,7 +273,7 @@ class MessageCount extends Component {
</span> </span>
<Tag className="pr-branch-tag"> <Tag className="pr-branch-tag">
<Link <Link
to={`/projects/${owner}/${projectsId}/coders?branch=${data.pull_request.base}`} to={`/projects/${owner}/${projectsId}?branch=${data.pull_request.base}`}
className="ver-middle" className="ver-middle"
> >
{/* {data.pull_request.is_fork ? data.pull_request.base : `${data.pull_request.pull_request_user}:${data.pull_request.base}`} */} {/* {data.pull_request.is_fork ? data.pull_request.base : `${data.pull_request.pull_request_user}:${data.pull_request.base}`} */}

View File

@ -407,7 +407,7 @@ class merge extends Component {
</div> </div>
{data && data.search_count && data.search_count > 0 ? ( {data && data.search_count && data.search_count > 0 ? (
<div style={{minHeight:"400px"}}> <div style={{minHeight:"470px"}}>
<Spin spinning={isSpin}> <Spin spinning={isSpin}>
<OrderItem <OrderItem
issues={issues} issues={issues}

View File

@ -150,7 +150,7 @@ class Index extends Component {
isSpin: false isSpin: false
}) })
this.props.showNotification(`${projectsType === "deposit" ? "托管" : "镜像"}项目创建成功!`); this.props.showNotification(`${projectsType === "deposit" ? "托管" : "镜像"}项目创建成功!`);
this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}/coders`); this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}`);
} }
} }
}).catch((error) => { }).catch((error) => {

View File

@ -55,8 +55,8 @@ class UserSubmitComponent extends Component {
getTopCount && getTopCount(values.branchname); getTopCount && getTopCount(values.branchname);
} }
let url = values.branchname let url = values.branchname
? `/projects/${owner}/${projectsId}/coders?branch=${values.branchname}` ? `/projects/${owner}/${projectsId}?branch=${values.branchname}`
: `/projects/${owner}/${projectsId}/coders`; : `/projects/${owner}/${projectsId}`;
this.props.history.push(url); this.props.history.push(url);
} }
}) })
@ -92,8 +92,8 @@ class UserSubmitComponent extends Component {
this.setState({ isSpin: false }); this.setState({ isSpin: false });
if (result.data && result.data.status === 1) { if (result.data && result.data.status === 1) {
let url = values.branchname let url = values.branchname
? `/projects/${owner}/${projectsId}/coders?branch=${values.branchname}` ? `/projects/${owner}/${projectsId}?branch=${values.branchname}`
: `/projects/${owner}/${projectsId}/coders`; : `/projects/${owner}/${projectsId}`;
this.props.history.push(url); this.props.history.push(url);
this.props.showNotification("修改成功!"); this.props.showNotification("修改成功!");
@ -219,7 +219,7 @@ class UserSubmitComponent extends Component {
<Button <Button
type="primary grey" type="primary grey"
onClick={() => { onClick={() => {
this.props.history.push(`/projects/${owner}/${projectsId}/coders`); this.props.history.push(`/projects/${owner}/${projectsId}`);
}} }}
className="mr20" className="mr20"
> >

View File

@ -282,7 +282,7 @@ class MilepostDetail extends Component {
</div> </div>
{ {
search_count > limit? search_count > limit?
<div className="mt30 mb50 edu-txt-center"> <div className="mt30 mb10 edu-txt-center">
<Pagination simple current={page} total={search_count} pageSize={limit} onChange={this.ChangePage}></Pagination> <Pagination simple current={page} total={search_count} pageSize={limit} onChange={this.ChangePage}></Pagination>
</div>:"" </div>:""
} }

View File

@ -211,6 +211,9 @@
padding: 6px 30px; padding: 6px 30px;
cursor: pointer; cursor: pointer;
} }
.setItemStyle{
min-height:440px;
}
.setItemStyle .issueItem{ .setItemStyle .issueItem{
padding:16px 0px; padding:16px 0px;
} }
@ -221,9 +224,6 @@
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
padding: 16px 20px; padding: 16px 20px;
} }
.issueItem:last-child{
border-bottom: none;
}
.issueNo { .issueNo {
padding: 0px 5px; padding: 0px 5px;
border-radius: 4px; border-radius: 4px;

View File

@ -826,7 +826,7 @@ class order extends Component {
)} )}
{ {
search_count > select_params.limit ? search_count > select_params.limit ?
<div className="mt30 mb50 edu-txt-center"> <div className="mt30 mb10 edu-txt-center">
<Pagination <Pagination
simple simple
defaultCurrent={select_params.page} defaultCurrent={select_params.page}

View File

@ -103,7 +103,7 @@ export default Form.create()(
.then(result => { .then(result => {
if (result) { if (result) {
showNotification("版本修改成功!"); showNotification("版本修改成功!");
history.push(`/projects/${owner}/${projectsId}/coders/releases`); history.push(`/projects/${owner}/${projectsId}/releases`);
} }
}); });
} else { } else {
@ -116,7 +116,7 @@ export default Form.create()(
.then(result => { .then(result => {
if (result) { if (result) {
showNotification("版本发布成功!"); showNotification("版本发布成功!");
history.push(`/projects/${owner}/${projectsId}/coders/releases`); history.push(`/projects/${owner}/${projectsId}/releases`);
} }
}); });
} }
@ -233,7 +233,7 @@ export default Form.create()(
</Button> </Button>
<Button <Button
onClick={() => onClick={() =>
history.push(`/projects/${owner}/${projectsId}/coders/releases`) history.push(`/projects/${owner}/${projectsId}/releases`)
} }
style={{ style={{
backgroundColor: "rgba(187,187,187,1)", backgroundColor: "rgba(187,187,187,1)",

View File

@ -75,7 +75,7 @@ class version extends Component {
<div className="versionInfo_right"> <div className="versionInfo_right">
<span className="versionName"> <span className="versionName">
<span className="task-hide">{item.name}</span> <span className="task-hide">{item.name}</span>
<Link to={`/projects/${owner}/${projectsId}/coders/releases/${item.version_id}/update`} className="color-blue ml3 font-12">编辑</Link> <Link to={`/projects/${owner}/${projectsId}/releases/${item.version_id}/update`} className="color-blue ml3 font-12">编辑</Link>
</span> </span>
<span className="color-grey-3"> <span className="color-grey-3">
<i className={`${item.bodyshow ? "iconfont icon-sanjiaoxing-down color-grey-8 mr3 font-14":"iconfont icon-triangle color-grey-8 mr3 font-14"}`} onClick={()=>this.showBody(key,item.bodyshow)}></i> <i className={`${item.bodyshow ? "iconfont icon-sanjiaoxing-down color-grey-8 mr3 font-14":"iconfont icon-triangle color-grey-8 mr3 font-14"}`} onClick={()=>this.showBody(key,item.bodyshow)}></i>
@ -112,7 +112,7 @@ class version extends Component {
<span className="font-18 color-grey-3">版本发布</span> <span className="font-18 color-grey-3">版本发布</span>
{ {
data && data.user_permission ? data && data.user_permission ?
<Link to={`/projects/${owner}/${projectsId}/coders/releases/new`} className="topWrapper_btn_new">+ 发布新版</Link> <Link to={`/projects/${owner}/${projectsId}/releases/new`} className="topWrapper_btn_new">+ 发布新版</Link>
: '' : ''
} }
</div> </div>

View File

@ -768,9 +768,9 @@ class NewHeader extends Component {
{this.props.user && this.props.user.login ? {this.props.user && this.props.user.login ?
<div className="edu-menu-panel"> <div className="edu-menu-panel">
<i className="iconfont icon-tianjiafangda color-grey-3"></i> <i className="iconfont icon-tianjiafangda color-grey-3"></i>
<div className="edu-menu-list" style={{ top: '46px', width: "240px" }}> <div className="edu-menu-list" style={{ top: '46px' }}>
<div className="overPart"></div> <div className="overPart"></div>
<ul className={coursestypes === true && this.props.user && this.props.user.main_site === false ? "fl headwith100b edu-txt-center pr ul-leftline" : "fl with50 edu-txt-center pr ul-leftline"}> {/* <ul className={coursestypes === true && this.props.user && this.props.user.main_site === false ? "fl headwith100b edu-txt-center pr ul-leftline" : "fl with50 edu-txt-center pr ul-leftline"}>
{ {
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_syllabuses && mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_syllabuses &&
<li><a href={`${mygetHelmetapi2.new_course.new_syllabuses}`} target="_blank">新建课程</a></li> <li><a href={`${mygetHelmetapi2.new_course.new_syllabuses}`} target="_blank">新建课程</a></li>
@ -779,10 +779,10 @@ class NewHeader extends Component {
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_course && mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_course &&
<li><a href={`${mygetHelmetapi2.new_course.new_course}`} target="_blank">新建班级</a></li> <li><a href={`${mygetHelmetapi2.new_course.new_course}`} target="_blank">新建班级</a></li>
} }
</ul> </ul> */}
{ {
coursestypes === true && this.props.user && this.props.user.main_site === false ? "" : coursestypes === true && this.props.user && this.props.user.main_site === false ? "" :
<ul className="fl with50 edu-txt-center"> <ul className="fl edu-txt-center">
<li><Link to={"/projects/mirror/new"}>新建镜像项目</Link></li> <li><Link to={"/projects/mirror/new"}>新建镜像项目</Link></li>
<li><Link to={"/projects/deposit/new"}>新建托管项目</Link></li> <li><Link to={"/projects/deposit/new"}>新建托管项目</Link></li>
</ul> </ul>