- {truncateCommitId(`${item.sha}`)}
- {item.message}
+ {truncateCommitId(`${item.sha}`)}
+ {item.message}
{
item.id ?
-
+
{item.image_url?
:""}
:
diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js
index 4adb229d..d5a9670c 100644
--- a/src/forge/Main/CoderRootFileDetail.js
+++ b/src/forge/Main/CoderRootFileDetail.js
@@ -149,7 +149,7 @@ class CoderRootFileDetail extends Component {
.then((result) => {
if (result) {
this.props.showNotification("删除成功!");
- this.props.history.push(`/projects/${owner}/${projectsId}`);
+ this.props.history.push(`/${owner}/${projectsId}`);
}
})
.catch((error) => {
diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js
index 84ab94d3..0fb30c4e 100644
--- a/src/forge/Main/CoderRootIndex.js
+++ b/src/forge/Main/CoderRootIndex.js
@@ -87,57 +87,57 @@ class CoderRootIndex extends Component{
{/* 新建文件 */}
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
diff --git a/src/forge/Main/CoderRootTag.js b/src/forge/Main/CoderRootTag.js
index a87386d5..da1fa96d 100644
--- a/src/forge/Main/CoderRootTag.js
+++ b/src/forge/Main/CoderRootTag.js
@@ -49,7 +49,7 @@ export default (( props, { projectDetail }) => {
{item.name}
- {truncateCommitId(`${item.id}`)}
+ {truncateCommitId(`${item.id}`)}
TAR
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 0a830a8c..3303d42c 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -3,9 +3,8 @@ import { Spin, Tooltip, Button } from 'antd';
import { Link, Route, Switch } from 'react-router-dom';
import { Content, AlignTop } from '../Component/layout';
import DetailBanner from './sub/DetailBanner';
-import { numFormat } from 'educoder';
import '../css/index.scss'
-import './list.scss';
+import './list.css';
import Loadable from 'react-loadable';
import Loading from '../../Loading';
@@ -142,8 +141,8 @@ const WikiEdit = Loadable({
*/
function checkPathname(projectsId, owner, pathname) {
let name = "";
- if (pathname && pathname !== `/projects/${owner}/${projectsId}`) {
- let url = pathname.split(`/projects/${owner}/${projectsId}`)[1];
+ if (pathname && pathname !== `/${owner}/${projectsId}`) {
+ let url = pathname.split(`/${owner}/${projectsId}`)[1];
if (url.indexOf("/about") > -1) {
name = "about"
} else if (url.indexOf("/issues") > -1 || url.indexOf("Milepost") > 0) {
@@ -154,8 +153,8 @@ function checkPathname(projectsId, owner, pathname) {
name = "milestones"
} else if (url.indexOf("/activity") > -1) {
name = "activity"
- } else if (url.indexOf("/setting") > -1) {
- name = "setting"
+ } else if (url.indexOf("/settings") > -1) {
+ name = "settings"
} else if (url.indexOf(`/devops`) > -1) {
name = "devops"
} else if (url.indexOf(`/source`) > -1) {
@@ -405,7 +404,7 @@ class Detail extends Component {
const url = `/${owner}/${projectsId}/forks.json`;
axios.post(url).then(result => {
if (result && result.data.status === 0) {
- this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}`);
+ this.props.history.push(`/${current_user && current_user.login}/${result.data.identifier}`);
this.props.showNotification(result.data.message);
}
this.setState({
@@ -441,9 +440,9 @@ class Detail extends Component {
return forked_from_project_id && fork_info ?
复刻自
- {fork_info.fork_project_user_name}
+ {fork_info.fork_project_user_name}
/
- {fork_info.fork_form_name}
+ {fork_info.fork_form_name}
: ""
}
@@ -472,15 +471,15 @@ class Detail extends Component {
-
+
{project && project.author &&
- {project.author.name}
+ {project.author.name}
}
/
- {projectDetail && projectDetail.name}
+ {projectDetail && projectDetail.name}
{projectDetail && projectDetail.private && 私有}
@@ -491,77 +490,69 @@ class Detail extends Component {
: ""
}
{
- projectDetail && projectDetail.type && projectDetail.type !== 0 ?
-
镜像自 {projectDetail.mirror_url}
- :""
+ projectDetail && projectDetail.type && projectDetail.type !== 0 ?
+
镜像自 {projectDetail.mirror_url}
+ : ""
}
@@ -592,190 +583,191 @@ class Detail extends Component {
{/* 资源 */}
- ()
}
>
{/* 主页 */}
- ()
}
>
{/* wiki新增文件 */}
- ()
}
>
{/* wiki编辑文件 */}
- ()
}
>
{/* wiki */}
- ()
}
>
{/* 工作流 */}
- ()
}
>
{/* 标签列表 */}
- ()
}
>
{/* 仓库设置 */}
- ()
}
>
- {/* 任务详情 */}
- ()
- }
- >
+
{/*修改里程碑*/}
- ()
}
>
{/* 新建里程碑 */}
- ()
}
>
{/*里程碑详情*/}
- ()
}
>
{/* 里程碑 */}
- ()
}
>
{/* 里程碑页面新建任务 */}
- ()
}
>
{/* 新建任务 */}
- ()
}
>
{/* 修改详情 */}
- ()
}
>
{/* 复制详情 */}
- ()
}
+ >
+ {/* 任务详情 */}
+ ()
+ }
>
{/* 动态 */}
- ()
}
>
{/* 代码Index */}
- ()
}
>
{/* 新建合并请求 */}
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
>
{/* 贡献者列表 */}
- ()
}
>
{/* 代码库----详情页面 */}
- ()
}
>
- ()
}
>
- ()
}
>
- ()
}
@@ -787,6 +779,5 @@ class Detail extends Component {
)
}
}
-export default Detail;
-
+export default Detail;
diff --git a/src/forge/Main/DetailTop.js b/src/forge/Main/DetailTop.js
index 260ff1e6..ecd5ab9f 100644
--- a/src/forge/Main/DetailTop.js
+++ b/src/forge/Main/DetailTop.js
@@ -12,19 +12,19 @@ class DetailTop extends Component {
{
platform ?
- 0 ? "active" : ""}>
+ 0 ? "active" : ""}>
{(coderCount && coderCount.commits_count) || 0}个提交
- 0 ? "active" : ""}>
+ 0 ? "active" : ""}>
{(coderCount && coderCount.branches_count) || 0}个分支
- 0 ? "active" : ""}>
+ 0 ? "active" : ""}>
{(coderCount && coderCount.tags_count) || 0}个标签
- 0 ? "active" : ""}>
+ 0 ? "active" : ""}>
{(coderCount && coderCount.version_releasesed_count) || 0}个发行版
diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx
index a6b0b49c..0daa6319 100644
--- a/src/forge/Main/Diff.jsx
+++ b/src/forge/Main/Diff.jsx
@@ -59,7 +59,7 @@ export default ({ match , history }) => {
{commit && commit.message &&
{commit.message}
}
-
+
diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js
index 0169d84b..afe10817 100644
--- a/src/forge/Main/Index.js
+++ b/src/forge/Main/Index.js
@@ -1,5 +1,4 @@
import React, { Component } from 'react';
-import { Link } from 'react-router-dom';
import { Menu, Input , Spin, Pagination , Popover , Select } from 'antd';
import Slider from "react-slick";
import { getImageUrl } from 'educoder';
@@ -13,6 +12,8 @@ import axios from 'axios';
import img_new from '../Images/new.png';
import img_array from '../Images/array.png';
import banner from '../Images/banner_list.jpg';
+import CheckProfile from '../Component/ProfileModal/Profile';
+
const Search = Input.Search;
class Index extends Component {
@@ -228,7 +229,7 @@ class Index extends Component {
}
getoDetail=(login,identifier)=>{
- this.props.history.push(`/projects/${login}/${identifier}`);
+ this.props.history.push(`/${login}/${identifier}`);
}
// 选择语言类别
@@ -255,8 +256,12 @@ class Index extends Component {
newItem = ()=>{
return(
)
}
diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js
index 4f9740c1..d2b2c097 100644
--- a/src/forge/Main/IndexItem.js
+++ b/src/forge/Main/IndexItem.js
@@ -28,14 +28,14 @@ class IndexItem extends Component {

:
-
+

}
-
+
{item.author.name}/{item.name}
{ !item.is_public && 私有 }
diff --git a/src/forge/Main/sub/Contribute.jsx b/src/forge/Main/sub/Contribute.jsx
index f65b4524..76d56dc8 100644
--- a/src/forge/Main/sub/Contribute.jsx
+++ b/src/forge/Main/sub/Contribute.jsx
@@ -52,7 +52,7 @@ function Contribute(props){
-
{item.name}
+
{item.name}
提交{item.contributions}次
diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx
index cdc1e2fa..abce4003 100644
--- a/src/forge/Main/sub/DetailBanner.jsx
+++ b/src/forge/Main/sub/DetailBanner.jsx
@@ -1,7 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Skeleton , Tooltip} from 'antd';
import { Link } from 'react-router-dom';
-import { numFormat } from 'educoder';
function DetailBanner({ history,list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){
const [ menuName , setMenuName ] = useState(undefined);
@@ -11,7 +10,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
if(pathname && pathname==="source"){
let a = list.filter(item=>item.menu_name === "resources");
if(a && a.length === 0){
- history.push(`/projects/${owner}/${projectsId}`);
+ history.push(`/${owner}/${projectsId}`);
}
}
setMenuName(list);
@@ -29,8 +28,8 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
{
item.menu_name === "home" &&
-
-
+
+
主页
@@ -38,8 +37,8 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
{
item.menu_name === "code" &&
-
-
+
+
代码库
@@ -48,10 +47,10 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
item.menu_name === "issues" &&
-
-
+
+
易修
- {projectDetail && projectDetail.issues_count ? {numFormat(projectDetail.issues_count)} : ""}
+ {projectDetail && projectDetail.issues_count ? {projectDetail.issues_count} : ""}
@@ -59,17 +58,17 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
{
item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
-
-
+
+
合并请求
- {projectDetail && projectDetail.pull_requests_count ? {numFormat(projectDetail.pull_requests_count)} : ""}
+ {projectDetail && projectDetail.pull_requests_count ? {projectDetail.pull_requests_count} : ""}
:""
}
{
item.menu_name === "wiki" &&
-
+
Wiki
@@ -78,47 +77,48 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
{
item.menu_name === "devops" && platform ?
-
- 工作流(beta版)
- {projectDetail && projectDetail.ops_count ? {numFormat(projectDetail.ops_count)} : ""}
+ {/* */}
+
+ 工作流(beta版)
+ {projectDetail && projectDetail.ops_count ? {projectDetail.ops_count} : ""}
:""
}
{
- item.menu_name === "resources" &&
-
-
-
- 资源库
- {projectDetail && projectDetail.source_count ? {numFormat(projectDetail.source_count)} :""}
-
-
+ // item.menu_name === "resources" &&
+ //
+ //
+ //
+ // 资源库
+ // {projectDetail && projectDetail.source_count ? {projectDetail.source_count} :""}
+ //
+ //
}
{
item.menu_name === "versions" &&
-
-
+
+
里程碑
- {projectDetail && projectDetail.versions_count ? {numFormat(projectDetail.versions_count)} :""}
+ {projectDetail && projectDetail.versions_count ? {projectDetail.versions_count} :""}
}
{
item.menu_name === "activity" &&
-
-
+
+
动态
}
{
- item.menu_name === "setting" &&
-
-
- 0 ? "iconfont icon-cangkushezhiicon color-grey-3 mr5 font-14":"iconfont icon-cangkushezhiicon color-grey-6 font-14 mr5"}>
+ item.menu_name === "settings" &&
+
+
+ 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}>
仓库设置
diff --git a/src/forge/Main/sub/Invite.jsx b/src/forge/Main/sub/Invite.jsx
index e621bd6d..201cee6d 100644
--- a/src/forge/Main/sub/Invite.jsx
+++ b/src/forge/Main/sub/Invite.jsx
@@ -1,26 +1,15 @@
import React from 'react';
-import { Tooltip , message } from 'antd';
import './sub.scss';
+import CopyTool from '../../Component/CopyTool';
function Invite({code,className}) {
- function jsCopy(id) {
- const copyEle = document.querySelector(id); // 获取要复制的节点
- const range = document.createRange(); // 创造range
- window.getSelection().removeAllRanges(); //清除页面中已有的selection
- range.selectNode(copyEle); // 选中需要复制的节点
- window.getSelection().addRange(range); // 执行选中元素
- document.execCommand("Copy"); // 执行copy操作
- message.success('复制成功');
- }
return(
)
diff --git a/src/forge/Merge/Commits.jsx b/src/forge/Merge/Commits.jsx
index 37c254cc..93e867ae 100644
--- a/src/forge/Merge/Commits.jsx
+++ b/src/forge/Merge/Commits.jsx
@@ -16,10 +16,10 @@ function Commits({ commits , projectsId , owner }){
- {truncateCommitId(`${item.sha}`)}
+ {truncateCommitId(`${item.sha}`)}
{item.message}
- 浏览代码
+ 浏览代码
:提交于{item.time_from_now}
diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx
index 40e617c2..82a8638c 100644
--- a/src/forge/Merge/Files.jsx
+++ b/src/forge/Merge/Files.jsx
@@ -47,7 +47,7 @@ function Files({data,history,owner,projectsId}){
{item.name}
-
+
+{item.addition}
-{item.deletion}
diff --git a/src/forge/Merge/MergeDetail.js b/src/forge/Merge/MergeDetail.js
index a7e2f33e..76c31ba0 100644
--- a/src/forge/Merge/MergeDetail.js
+++ b/src/forge/Merge/MergeDetail.js
@@ -228,7 +228,7 @@ class MergeDetail extends Component {
{
data && data.issue.user_permission ?
- 编辑
+ 编辑
: ''
}
@@ -248,8 +248,8 @@ class MergeDetail extends Component {
- - 0 ? "active" : ""}>对话内容
- - 0 ? "active" : ""}>代码提交
+ - 0 ? "active" : ""}>对话内容
+ - 0 ? "active" : ""}>代码提交
diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js
index f21cc3f5..884c50fe 100644
--- a/src/forge/Merge/MergeItem.js
+++ b/src/forge/Merge/MergeItem.js
@@ -62,7 +62,7 @@ class MergeItem extends Component {
@@ -78,7 +78,7 @@ class MergeItem extends Component {
{item && item.author_name}
@@ -109,7 +109,7 @@ class MergeItem extends Component {
item.pull_request_head &&
{item.is_original
@@ -133,7 +133,7 @@ class MergeItem extends Component {
item.pull_request_base &&
{/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */}
@@ -156,7 +156,7 @@ class MergeItem extends Component {
{item.assign_user_name ? (
{item.assign_user_name}
@@ -175,7 +175,7 @@ class MergeItem extends Component {
{item.journals_count ? (
{item.journals_count}
@@ -196,7 +196,7 @@ class MergeItem extends Component {
>
diff --git a/src/forge/Merge/MergeSubmit.js b/src/forge/Merge/MergeSubmit.js
index 8f2275d8..d4b42c3b 100644
--- a/src/forge/Merge/MergeSubmit.js
+++ b/src/forge/Merge/MergeSubmit.js
@@ -100,7 +100,7 @@ class MergeSubmit extends Component{
width:"10%",
render: (text,item) => (
-
+
@@ -110,7 +110,7 @@ class MergeSubmit extends Component{
title:"SHA",
dataIndex: 'sha',
render: (text) => (
- {text}
+ {text}
)
},{
title:"备注",
diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index f3e58657..d1b46b86 100644
--- a/src/forge/Merge/MessageCount.js
+++ b/src/forge/Merge/MessageCount.js
@@ -361,7 +361,7 @@ class MessageCount extends Component {
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {turnbar(data.pull_request && data.pull_request.head)}
@@ -376,7 +376,7 @@ class MessageCount extends Component {
{data.issue.project_author_name}:{data.pull_request.base}
@@ -386,14 +386,14 @@ class MessageCount extends Component {
}
-
+
由
-
+
{data.issue.author_name}
@@ -408,7 +408,7 @@ class MessageCount extends Component {
审查人员:
{data.issue.assign_user_name ? (
{data.issue.assign_user_name}
@@ -448,7 +448,7 @@ class MessageCount extends Component {
type="green"
ghost
className="ml20"
- onClick={()=>{this.props.history.push(`/projects/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}}
+ onClick={()=>{this.props.history.push(`/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}}
>
编辑
diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js
index 97df7fb1..956be000 100644
--- a/src/forge/Merge/NewMerge.js
+++ b/src/forge/Merge/NewMerge.js
@@ -186,7 +186,7 @@ class NewMerge extends Component {
// this.ischeckmerge();
let { id ,merge , pull } = this.state;
if(type==="pull"){
- this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new/${pull}`)
+ this.props.history.push(`/${owner}/${projectsId}/pulls/new/${pull}`)
this.compareProject(id,value,merge);
}else{
this.compareProject(id,pull,value);
@@ -208,7 +208,7 @@ class NewMerge extends Component {
merge_user_login: is_fork_id ? projects_names[0].project_user_login : undefined
}
})
- this.props.history.push(`/projects/${login}/${identifier}/pulls/new`);
+ this.props.history.push(`/${login}/${identifier}/pulls/new`);
this.newMergelist(login,identifier);
};
diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js
index 2b72cbee..1e1285e4 100644
--- a/src/forge/Merge/merge.js
+++ b/src/forge/Merge/merge.js
@@ -8,6 +8,7 @@ import MergeItem from "./MergeItem";
import './Index.scss';
import axios from "axios";
+import CheckProfile from '../Component/ProfileModal/Profile';
const Search = Input.Search;
/**
@@ -212,7 +213,7 @@ class merge extends Component {
checkOperation() {
const { projectsId,owner } = this.props.match.params;
- this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new`);
+ this.props.history.push(`/${owner}/${projectsId}/pulls/new`);
}
render() {
const { projectsId , owner } = this.props.match.params;
@@ -256,9 +257,9 @@ class merge extends Component {
{
data && data.user_admin_or_developer &&
- this.checkOperation()}>
+ this.checkOperation()}>
+ 新建合并请求
-
+
}
diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js
index 3481cc8f..9332d9b8 100644
--- a/src/forge/Merge/merge_form.js
+++ b/src/forge/Merge/merge_form.js
@@ -165,7 +165,7 @@ class MergeForm extends Component {
this.setState({
isSpin: false,
});
- this.props.history.push(`/projects/${owner}/${projectsId}/pulls`);
+ this.props.history.push(`/${owner}/${projectsId}/pulls`);
const { getDetail } = this.props;
getDetail && getDetail();
} else {
@@ -195,7 +195,7 @@ class MergeForm extends Component {
isSpin: false,
});
this.props.history.push(
- `/projects/${owner}/${projectsId}/pulls/${mergeId}/Messagecount`
+ `/${owner}/${projectsId}/pulls/${mergeId}/Messagecount`
);
} else {
this.setState({
@@ -287,7 +287,7 @@ class MergeForm extends Component {
type="default"
className="ml30"
onClick={()=>{
- this.props.history.push(merge_type === "new" ? `/projects/${owner}/${projectsId}/pulls` : `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`)
+ this.props.history.push(merge_type === "new" ? `/${owner}/${projectsId}/pulls` : `/${owner}/${projectsId}/pulls/${mergeId}/detail`)
}}
>
取消
diff --git a/src/forge/Merge/no_data.js b/src/forge/Merge/no_data.js
index 8ad550ab..d5584797 100644
--- a/src/forge/Merge/no_data.js
+++ b/src/forge/Merge/no_data.js
@@ -12,7 +12,7 @@ class Nodata extends Component{
欢迎使用合并请求!
- 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求
+ 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求
diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js
index 18f2aa9a..aaaab6c8 100644
--- a/src/forge/New/Index.js
+++ b/src/forge/New/Index.js
@@ -209,17 +209,16 @@ class Index extends Component {
user_id:owners_id
}).then((result) => {
if (result && result.data.id) {
- this.setState({
- isSpin: false
- })
projectsType && projectsType !== "mirror" && this.props.showNotification(`托管项目创建成功!`);
- this.props.history.push(`/projects/${result.data.login}/${result.data.identifier}`);
+ this.props.history.push(`/${result.data.login}/${result.data.identifier}`);
}
+ this.setState({
+ isSpin: false
+ })
}).catch((error) => {
this.setState({
isSpin: false
})
- console.log(error);
})
} else {
this.setState({
diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js
index 5cba3cf6..65fa7ec2 100644
--- a/src/forge/Newfile/UserSubmitComponent.js
+++ b/src/forge/Newfile/UserSubmitComponent.js
@@ -86,7 +86,7 @@ class UserSubmitComponent extends Component {
const { getTopCount } = this.props;
getTopCount && getTopCount(values.branchname);
}
- let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;
+ let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;
this.props.history.push(url);
}
})
@@ -123,7 +123,7 @@ class UserSubmitComponent extends Component {
this.setState({ isSpin: false });
if (result.data && result.data.status === 1) {
let b = currentBranch || branch;
- let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`;
+ let url = `/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`;
this.props.history.push(url);
this.props.showNotification("文件修改成功!");
}
@@ -150,7 +150,7 @@ class UserSubmitComponent extends Component {
return (
-
+
{
- this.props.history.push(`/projects/${owner}/${projectsId}`);
+ this.props.history.push(`/${owner}/${projectsId}`);
}}
className="mr20"
>
diff --git a/src/forge/Notice/Apply.jsx b/src/forge/Notice/Apply.jsx
index 3c77edfa..aeacd67a 100644
--- a/src/forge/Notice/Apply.jsx
+++ b/src/forge/Notice/Apply.jsx
@@ -63,11 +63,11 @@ function Apply(props) {
{
list.map((i,k)=>{
return(
-
-
+
+
- {i.user && i.user.name}
+ {i.user && i.user.name}
{i.time_ago}
diff --git a/src/forge/Notice/Index.jsx b/src/forge/Notice/Index.jsx
index 02f05a87..3f61688f 100644
--- a/src/forge/Notice/Index.jsx
+++ b/src/forge/Notice/Index.jsx
@@ -33,7 +33,7 @@ function Index(props){
useEffect(()=>{
if((username && current_user && (current_user.login !== username))){
- props.history.push(`/users/${username}`);
+ props.history.push(`/${username}`);
}
},[current_user,username])
@@ -47,14 +47,14 @@ function Index(props){
useEffect(()=>{
if(pathname && username){
- if(pathname === `/users/${username}/notice`){
+ if(pathname === `/${username}/notice`){
setMenu("notify");
changeNum(user.undo_messages);
}
- if(pathname === `/users/${username}/notice/undo`){
+ if(pathname === `/${username}/notice/undo`){
setMenu("undo");
}
- if(pathname === `/users/${username}/notice/apply`){
+ if(pathname === `/${username}/notice/apply`){
setMenu("apply");
}
}
@@ -84,19 +84,19 @@ function Index(props){
-
-
+
通知
{messagesCount ? {messagesCount}:""}
-
-
+
接收仓库
{transferCount ? {transferCount}:""}
-
-
+
成员申请
{applyCount ? {applyCount}:""}
@@ -104,19 +104,19 @@ function Index(props){
{
return ;
}}
>
{
return ;
}}
>
{
return ;
}}
diff --git a/src/forge/Notice/Notify.jsx b/src/forge/Notice/Notify.jsx
index 761366d3..31373908 100644
--- a/src/forge/Notice/Notify.jsx
+++ b/src/forge/Notice/Notify.jsx
@@ -44,13 +44,13 @@ function Notify(props){
if(status){
switch(status){
case 'canceled':
- return 取消转移【{project && project.name}】仓库
+ return 取消转移【{project && project.name}】仓库
case 'common':
- return 正在将【{project && project.name}】仓库转移给【{owner && owner.name}】
+ return 正在将【{project && project.name}】仓库转移给【{owner && owner.name}】
case 'successed':
- return 【{project && project.name}】仓库成功转移给【{owner && owner.name}】
+ return 【{project && project.name}】仓库成功转移给【{owner && owner.name}】
default:
- return 拒绝转移【{project && project.name}】仓库
+ return 拒绝转移【{project && project.name}】仓库
}
}else{
return ""
@@ -62,9 +62,9 @@ function Notify(props){
if(status){
switch(status){
case 'successed':
- return 已通过你加入【{project && project.name}】项目的申请
+ return 已通过你加入【{project && project.name}】项目的申请
default:
- return 已拒绝你加入【{project && project.name}】项目的申请
+ return 已拒绝你加入【{project && project.name}】项目的申请
}
}else{
return ""
@@ -80,12 +80,13 @@ function Notify(props){
{
list.map((i,k)=>{
+ console.log(i);
return(
- -
-
+ -
+
- {i.applied_user && i.applied_user.name}
+ {i.applied_user && i.applied_user.name}
{i.time_ago}
{ i.applied_type === "AppliedProject" ? renderApplyStatus(i.status,i.applied):renderStatus(i.status,i.applied)}
diff --git a/src/forge/Notice/UndoEvent.jsx b/src/forge/Notice/UndoEvent.jsx
index c8c579dc..18cb6d4a 100644
--- a/src/forge/Notice/UndoEvent.jsx
+++ b/src/forge/Notice/UndoEvent.jsx
@@ -68,16 +68,16 @@ function UndoEvent(props){
{
list.map((i,k)=>{
return(
-
-
-
+ -
+
- {i.user && i.user.name}
+ {i.user && i.user.name}
{i.time_ago}
- 请求将仓库【{i.project && i.project.name}】
- 转移给【{i.owner && i.owner.name}】,是否接受?
+ 请求将仓库【{i.project && i.project.name}】
+ 转移给【{i.owner && i.owner.name}】,是否接受?
{
i.status === "common" &&
diff --git a/src/forge/Order/Detail.js b/src/forge/Order/Detail.js
index 644a653d..8805004b 100644
--- a/src/forge/Order/Detail.js
+++ b/src/forge/Order/Detail.js
@@ -85,7 +85,7 @@ class Detail extends Component {
})
.then((result) => {
if (result) {
- this.props.history.push(`/projects/${owner}/${projectsId}/issues`);
+ this.props.history.push(`/${owner}/${projectsId}/issues`);
}
})
.catch((error) => {
@@ -132,7 +132,7 @@ class Detail extends Component {
.then((result) => {
if (result) {
this.props.history.push(
- `/projects/${owner}/${projectsId}/issues/${result.data.issue_id}/copyetail`
+ `/${owner}/${projectsId}/issues/${result.data.issue_id}/copyetail`
);
}
})
@@ -207,7 +207,7 @@ class Detail extends Component {
由
{data && data.author_name}
@@ -269,7 +269,7 @@ class Detail extends Component {
编辑
diff --git a/src/forge/Order/Milepost.js b/src/forge/Order/Milepost.js
index ede2d314..5f6efeeb 100644
--- a/src/forge/Order/Milepost.js
+++ b/src/forge/Order/Milepost.js
@@ -4,6 +4,7 @@ import { Dropdown, Icon, Menu, Pagination, Typography, Popconfirm, Spin } from '
import NoneData from '../Nodata';
import axios from 'axios';
import './order.css';
+import CheckProfile from '../Component/ProfileModal/Profile';
const { Text } = Typography;
@@ -187,7 +188,7 @@ class Milepost extends Component {
{
data && data.user_admin_or_member ?
-
新的里程碑
+
{this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑
: ''
}
@@ -204,7 +205,7 @@ class Milepost extends Component {
- {item.name}
+ {item.name}
@@ -228,7 +229,7 @@ class Milepost extends Component {
- 编辑
+ 编辑
diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js
index 30526750..c1c8bdd0 100644
--- a/src/forge/Order/MilepostDetail.js
+++ b/src/forge/Order/MilepostDetail.js
@@ -2,7 +2,8 @@ import React, { Component } from "react";
import { Link } from 'react-router-dom';
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
import './order.css';
-import { FlexAJ } from '../Component/layout'
+import { FlexAJ } from '../Component/layout';
+import CheckProfile from '../Component/ProfileModal/Profile';
import NoneData from '../Nodata';
import OrderItem from './OrderItem';
@@ -113,7 +114,7 @@ class MilepostDetail extends Component {
this.setState({
data: result.data,
issues: result.data.issues,
- search_count: result.data.search_count,
+ search_count: params.status_type ==="1" ? result.data.open_issues_count : result.data.close_issues_count,
isSpin: false
})
}
@@ -238,8 +239,8 @@ class MilepostDetail extends Component {
{data && data.percent && data.percent.toFixed(2)}%完成
- 编辑里程碑
- 创建易修
+ 编辑里程碑
+ {this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建易修
diff --git a/src/forge/Order/Milepostitem.js b/src/forge/Order/Milepostitem.js
index 48bf65c1..d79c66fe 100644
--- a/src/forge/Order/Milepostitem.js
+++ b/src/forge/Order/Milepostitem.js
@@ -31,7 +31,7 @@ class OrderItem extends Component {
- {item.name}
+ {item.name}
@@ -65,7 +65,7 @@ class OrderItem extends Component {