- {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 40e617c2a..82a8638c6 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 a7e2f33e1..76c31ba0a 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 32f3f8114..884c50feb 100644
--- a/src/forge/Merge/MergeItem.js
+++ b/src/forge/Merge/MergeItem.js
@@ -49,7 +49,7 @@ class MergeItem extends Component {
};
render() {
- const { issues, project_name, project_author_name , user_admin_or_member} = this.props;
+ const { issues, project_name, project_author_name , user_admin_or_developer} = this.props;
const { projectsId , owner } = this.props.match.params;
const { current_user } = this.props;
const renderList = () => {
@@ -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}
@@ -183,7 +183,7 @@ class MergeItem extends Component {
) : (
""
)}
- {user_admin_or_member && item.pull_request_status === 0 ? (
+ {user_admin_or_developer && item.pull_request_status === 0 ? (
diff --git a/src/forge/Merge/MergeSubmit.js b/src/forge/Merge/MergeSubmit.js
index 8f2275d81..d4b42c3b4 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 f3e58657a..d1b46b865 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 97df7fb1b..956be0006 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 90e35dcc4..1e1285e4e 100644
--- a/src/forge/Merge/merge.js
+++ b/src/forge/Merge/merge.js
@@ -4,10 +4,11 @@ import "./merge.css";
import "../Order/order.css";
import "../Order/index.scss";
import NoneData from "./no_data";
-import OrderItem from "./MergeItem";
+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;
@@ -255,10 +256,10 @@ class merge extends Component {
/>
{
- data && data.user_admin_or_member &&
- this.checkOperation()}>
+ data && data.user_admin_or_developer &&
+ this.checkOperation()}>
+ 新建合并请求
-
+
}
@@ -387,7 +388,7 @@ class merge extends Component {
{data && data.search_count && data.search_count > 0 ? (
-
+ user_admin_or_developer={data && data.user_admin_or_developer}
+ >
):""}
{search_count > select_params.limit ? (
diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js
index 3481cc8f0..9332d9b85 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 8ad550abe..d5584797f 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 b0f073261..aaaab6c82 100644
--- a/src/forge/New/Index.js
+++ b/src/forge/New/Index.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
-import { Input , Form , Select , Checkbox , Button , Spin , AutoComplete } from 'antd';
+import { Input , Form , Select , Checkbox , Button , Spin , AutoComplete, Modal } from 'antd';
import { Base64 } from 'js-base64';
import '../css/index.scss';
@@ -58,6 +58,8 @@ class Index extends Component {
this.getGitignore();
// 获取开源许可证
this.getLicenses();
+ //判断是否为删除新建项目失败后返回,并执行对应逻辑
+ this.isDeleteProjectBack();
}
componentDidUpdate=(prevPros)=>{
if(prevPros && this.props && !this.props.checkIfLogin()){
@@ -69,6 +71,7 @@ class Index extends Component {
getOwner=()=>{
const { OIdentifier } = this.props.match.params;
const { user_id } = this.props && this.props.current_user;
+
const url = `/owners.json`;
axios.get(url).then(result=>{
if(result && result.data){
@@ -77,16 +80,13 @@ class Index extends Component {
OwnerList: owner,
})
if(OIdentifier){
- owner = owner.filter(item=>item.name === OIdentifier);
- this.props.form.setFieldsValue({
- user_id:OIdentifier
- })
+ owner = owner.filter(item=>item.login === OIdentifier);
}else if(user_id){
owner = owner.filter(item=>item.id === user_id);
- this.props.form.setFieldsValue({
- user_id:owner && owner[0].name
- })
}
+ this.props.form.setFieldsValue({
+ user_id:owner && owner[0].name
+ })
owner && this.setState({
owners_id:owner[0].id,
owners_name:owner[0].name
@@ -144,6 +144,31 @@ class Index extends Component {
}).catch((error) => { })
}
+ isDeleteProjectBack = () => {
+ let mirror_status = this.props.history.location.mirror_status;
+ if (mirror_status === 2 && sessionStorage.newProjectValue) {
+ Modal.warning({
+ title: '警告',
+ content: '镜像项目创建失败!请按操作规范重新创建项目!',
+ });
+ let newProjectValue = JSON.parse(sessionStorage.newProjectValue);
+ if (newProjectValue) {
+ this.setState({
+ project_language_id: newProjectValue.project_language_id,
+ project_category_id: newProjectValue.project_category_id,
+ license_id: newProjectValue.license_id,
+ ignore_id: newProjectValue.ignore_id
+ });
+ delete newProjectValue.project_language_id;
+ delete newProjectValue.project_category_id;
+ delete newProjectValue.license_id;
+ delete newProjectValue.ignore_id;
+ this.props.form.setFieldsValue(newProjectValue);
+ }
+
+ }
+ }
+
// 设置option
setOptionsList = (data, _head, name) => {
if (data && data.length > 0) {
@@ -172,6 +197,8 @@ class Index extends Component {
const { project_language_id, project_category_id, license_id, ignore_id , owners_id , owners_name } = this.state;
const decoderPass = Base64.encode(values.password);
const url = (projectsType && projectsType === "mirror") ? "/projects/migrate.json" : "/projects.json";
+ // 新建项目的时候,暂存数据,如果失败,返回的时候可以重新赋值
+ sessionStorage.newProjectValue=JSON.stringify({...values,project_language_id,project_category_id,license_id,ignore_id});
axios.post(url, {
...values,
auth_password:decoderPass,
@@ -182,17 +209,16 @@ class Index extends Component {
user_id:owners_id
}).then((result) => {
if (result && result.data.id) {
- this.setState({
- isSpin: false
- })
- this.props.showNotification(`${projectsType && projectsType === "mirror" ? "镜像" : "托管"}项目创建成功!`);
- this.props.history.push(`/projects/${result.data.login}/${result.data.identifier}`);
+ projectsType && projectsType !== "mirror" && this.props.showNotification(`托管项目创建成功!`);
+ 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({
@@ -337,7 +363,9 @@ class Index extends Component {
{
projectsType && projectsType === "mirror" &&
- 需要授权验证
+
+ 需要授权验证
+ 如果源项目为公有仓库,禁止填写用户名密码。如果源项目为私有仓库,则必须填写正确的用户名和密码!
{
mirrorCheck &&
diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js
index 5cba3cf62..65fa7ec24 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 3c77edfaa..aeacd67a2 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 63d097486..3f61688fb 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");
}
}
@@ -70,9 +70,9 @@ function Index(props){
function deleteEvent(type,count) {
let c = count;
if(type==="apply"){
- setTransferCount(transferCount-count);
- }else if(type==="undo"){
setApplyCount(applyCount-count);
+ }else if(type==="undo"){
+ setTransferCount(transferCount-count);
}else{
setMessagesCount(0);
c = messagesCount;
@@ -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 761366d3d..313739089 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 d93a1f83a..17dcc3216 100644
--- a/src/forge/Notice/UndoEvent.jsx
+++ b/src/forge/Notice/UndoEvent.jsx
@@ -53,7 +53,7 @@ function UndoEvent(props){
Axios.post(url).then(result=>{
if(result && result.data){
getList();
- props && props.deleteEvent("apply",1);
+ props && props.deleteEvent("undo",1);
}
}).catch(error=>{})
}
@@ -61,23 +61,23 @@ function UndoEvent(props){
return(
-
+
{
list && list.length > 0 ?
{
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 644a653dd..8805004b9 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 ede2d3149..48fc286ba 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;
@@ -118,11 +119,12 @@ class Milepost extends Component {
}
ChangePage = (page) => {
+ document.body.scrollIntoView();
this.setState({
page
})
-
- this.getList(page);
+ const { status } = this.state;
+ this.getList( page , status );
}
// 排序
@@ -187,7 +189,7 @@ class Milepost extends Component {
{
data && data.user_admin_or_member ?
-
新的里程碑
+
{this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑
: ''
}
@@ -204,7 +206,7 @@ class Milepost extends Component {
- {item.name}
+ {item.name}
@@ -228,7 +230,7 @@ class Milepost extends Component {
- 编辑
+ 编辑
@@ -259,7 +261,7 @@ class Milepost extends Component {
{
data && data.versions_count > limit ?
: ""
}
diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js
index 305267507..c1c8bdd06 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 48bf65c11..d79c66fea 100644
--- a/src/forge/Order/Milepostitem.js
+++ b/src/forge/Order/Milepostitem.js
@@ -31,7 +31,7 @@ class OrderItem extends Component {
- {item.name}
+ {item.name}
@@ -65,7 +65,7 @@ class OrderItem extends Component {
- 编辑
+ 编辑
diff --git a/src/forge/Order/Nav.js b/src/forge/Order/Nav.js
index 93fbc1011..b5d196d61 100644
--- a/src/forge/Order/Nav.js
+++ b/src/forge/Order/Nav.js
@@ -7,8 +7,8 @@ class Nav extends Component{
const { projectsId , owner } = this.props.match.params;
return(
- 标签
- 里程碑
+ 标签
+ 里程碑
)
}
diff --git a/src/forge/Order/OrderItem.js b/src/forge/Order/OrderItem.js
index 3c5e5cf85..081788641 100644
--- a/src/forge/Order/OrderItem.js
+++ b/src/forge/Order/OrderItem.js
@@ -44,6 +44,7 @@ class OrderItem extends Component {
render() {
const { item , checkbox , mile , user_admin_or_member } = this.props;
const { projectsId , owner } = this.props.match.params;
+ const { orderid , isdisplay } = this.state;
const { current_user } = this.props;
return (
item &&
@@ -51,7 +52,7 @@ class OrderItem extends Component {
{current_user && current_user.login && checkbox}
- {item.name}
+ {item.name}
{TagInfo(item.priority,"mr10")}
@@ -67,7 +68,7 @@ class OrderItem extends Component {
-
{
item.author_name ?
-
+
{item.author_name}
: "--"
@@ -76,7 +77,7 @@ class OrderItem extends Component {
-
{
item.assign_user_name ?
-
+
{item.assign_user_name}
: "--"
@@ -88,15 +89,24 @@ class OrderItem extends Component {
- {item.done_ratio || "--"}
-
-
{item.journals_count}
+
{item.journals_count}
{
user_admin_or_member ?
-
+
-
+
+
+
-
document.getElementById("hoverBox")} title={'您确定要删除当前易修吗?'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
+ this.deletedetail(item.id)}
+ >
diff --git a/src/forge/Order/UpdateMilepost.js b/src/forge/Order/UpdateMilepost.js
index 88a730331..c4f386575 100644
--- a/src/forge/Order/UpdateMilepost.js
+++ b/src/forge/Order/UpdateMilepost.js
@@ -79,7 +79,7 @@ class UpdateMilepost extends Component {
}).then(result => {
if (result) {
this.setState({ isSpin: false })
- this.props.history.push(`/projects/${owner}/${projectsId}/milestones`);
+ this.props.history.push(`/${owner}/${projectsId}/milestones`);
}
diff --git a/src/forge/Order/newMilepost.js b/src/forge/Order/newMilepost.js
index b95132122..b7d1102dd 100644
--- a/src/forge/Order/newMilepost.js
+++ b/src/forge/Order/newMilepost.js
@@ -63,7 +63,7 @@ class NewMilepost extends Component {
}).then(result => {
if (result) {
this.setState({ isSpin: false })
- this.props.history.push(`/projects/${owner}/${projectsId}/milestones`);
+ this.props.history.push(`/${owner}/${projectsId}/milestones`);
const { getDetail } = this.props;
getDetail && getDetail();
}
diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css
index 6a0f029e0..0abd116f2 100644
--- a/src/forge/Order/order.css
+++ b/src/forge/Order/order.css
@@ -20,6 +20,9 @@
.overlayBox{
width: 230px;
}
+.hideOverlay{
+ display: none;
+}
.topmilepost {
box-sizing: border-box;
display: flex;
diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js
index 1202f41fc..290bb03e3 100644
--- a/src/forge/Order/order.js
+++ b/src/forge/Order/order.js
@@ -1,12 +1,12 @@
import React, { Component } from "react";
import { Input, Dropdown, Menu, Icon, Pagination, Spin, DatePicker, Checkbox } from "antd";
-import { Link } from 'react-router-dom';
import "./order.css";
import './index.scss';
import moment from 'moment';
import NoneData from "../Nodata";
import OrderItem from "./OrderItem";
+import CheckProfile from '../Component/ProfileModal/Profile';
import axios from "axios";
@@ -351,9 +351,9 @@ class order extends Component {
if(data && data.user_admin_or_member){
const { projectsId , owner } = this.props.match.params;
return(
-
+
{window.open(`/${owner}/${projectsId}/issues/new`,'_blank')}}>
+ 创建易修
-
+
)
}
}
diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js
index b6f065b21..6515dde86 100644
--- a/src/forge/Order/order_form.js
+++ b/src/forge/Order/order_form.js
@@ -165,7 +165,7 @@ class order_form extends Component {
}).then((result) => {
if (result && result.data.id) {
this.props.showNotification("任务创建成功!");
- this.props.history.push(`/projects/${owner}/${projectsId}/issues/${result.data.id}/detail`);
+ this.props.history.push(`/${owner}/${projectsId}/issues/${result.data.id}`);
this.setState({
description: "",
isSpin: false,
@@ -191,7 +191,7 @@ class order_form extends Component {
...values,
}).then((result) => {
if (result) {
- this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`);
+ this.props.history.push(`/${owner}/${projectsId}/issues/${orderId}`);
this.props.showNotification("任务更新成功!");
const { getDetail } = this.props;
getDetail && getDetail();
@@ -371,7 +371,7 @@ class order_form extends Component {
type="default"
className="ml30"
onClick={()=>
- this.props.history.push(form_type === "new" ? `/projects/${owner}/${projectsId || orderId}/issues` : `/projects/${owner}/${projectsId}/issues/${orderId}/detail`)}
+ this.props.history.push(form_type === "new" ? `/${owner}/${projectsId || orderId}/issues` : `/${owner}/${projectsId}/issues/${orderId}`)}
>
取消
diff --git a/src/forge/SecuritySetting/Index.jsx b/src/forge/SecuritySetting/Index.jsx
index e314c66a2..d9d4e49c2 100644
--- a/src/forge/SecuritySetting/Index.jsx
+++ b/src/forge/SecuritySetting/Index.jsx
@@ -18,6 +18,10 @@ const SSHNew = Loadable({
loader: () => import("./sub/New"),
loading: Loading,
});
+const Profile = Loadable({
+ loader: () => import("../users/Material/Index"),
+ loading: Loading,
+});
const SSHIndex = Loadable({
loader: () => import("./sub/SSH"),
loading: Loading,
@@ -35,6 +39,10 @@ function Index(props){
{current_user && current_user.username}
+
+ - 个人信息
+ - -1 ?"active":""}>基本资料
+
- 安全设置
- -1 ?"active":""}>SSH密钥
@@ -49,6 +57,12 @@ function Index(props){
)}
>
+ (
+
+ )}
+ >
(
diff --git a/src/forge/SecuritySetting/Index.scss b/src/forge/SecuritySetting/Index.scss
index 664ed7ab4..f533f0530 100644
--- a/src/forge/SecuritySetting/Index.scss
+++ b/src/forge/SecuritySetting/Index.scss
@@ -36,6 +36,8 @@
.securityUl{
padding:20px 16px;
color: #333;
+ margin-bottom: 0px;
+ padding-bottom: 0px;
li{
margin-bottom: 10px;
height: 27px;
@@ -122,50 +124,6 @@
}
}
}
-.deleteBox{
- .ant-modal-header{
- background-color: rgba(223, 0, 2, 0.06);
- border-bottom: none;
- .ant-modal-title{
- text-align: left;
- font-size: 20px;
- }
- }
- .ant-modal-body{
- padding:30px 50px;
- p{
- font-size: 16px;
- line-height: 26px;
- color:#666
- }
- .desc{
- .descMain{
- align-items: center;
- justify-content: center;
- font-size: 20px;
- margin-bottom: 10px;
- i{
- font-size: 38px!important;
- color:#DF0002
- }
- }
- }
- }
- .ant-modal-footer{
- border-top: none;
- text-align: center;
- padding-bottom: 40px;
- button{
- width: 120px;
- margin:0px 20px;
- &.ant-btn-danger{
- background-color: #fff;
- color: #DF0002;
- border-color: #D0D0D0;
- }
- }
- }
-}
.descModal{
.ant-modal-title{
text-align: left;
diff --git a/src/forge/SecuritySetting/sub/DeleteBox.jsx b/src/forge/SecuritySetting/sub/DeleteBox.jsx
index af8b64189..02d816b32 100644
--- a/src/forge/SecuritySetting/sub/DeleteBox.jsx
+++ b/src/forge/SecuritySetting/sub/DeleteBox.jsx
@@ -1,17 +1,16 @@
import React from 'react';
import { AlignCenter } from '../../Component/layout';
-import { Modal , Button } from 'antd';
+import Modals from '../../Component/PublicModal/Index';
+import { Button } from 'antd';
function DeleteBox({ visible , onCancel ,onSuccess }) {
return(
-
@@ -19,10 +18,11 @@ function DeleteBox({ visible , onCancel ,onSuccess }) {
}
>
-
您确定要删除此 SSH 密钥吗?
-
此操作将永久删除该SSH密钥,且不可恢复。如果您想再次使用该密钥,则需要您重新上传。
+
+ 您确定要删除此 SSH 密钥吗?
+
此操作将永久删除该SSH密钥,且不可恢复。如果您想再次使用该密钥,则需要您重新上传。
-
+
)
}
export default DeleteBox;
\ No newline at end of file
diff --git a/src/forge/Settings/Branch.js b/src/forge/Settings/Branch.js
index d345f0fc1..3e19f37e7 100644
--- a/src/forge/Settings/Branch.js
+++ b/src/forge/Settings/Branch.js
@@ -88,7 +88,7 @@ export default ((props)=>{
// 跳转
function settingRule(protectBranch){
- props.history.push(`/projects/${owner}/${projectsId}/setting/branch/${protectBranch}`);
+ props.history.push(`/${owner}/${projectsId}/settings/branches/${protectBranch}`);
}
// 翻页
diff --git a/src/forge/Settings/BranchRule.jsx b/src/forge/Settings/BranchRule.jsx
index d15ecd00d..85b9bf20c 100644
--- a/src/forge/Settings/BranchRule.jsx
+++ b/src/forge/Settings/BranchRule.jsx
@@ -290,7 +290,7 @@ export default Form.create()(
{
- history.push(`/projects/${owner}/${projectsId}/setting/branch`);
+ history.push(`/${owner}/${projectsId}/settings/branches`);
}}
>
取消
diff --git a/src/forge/Settings/Collaborator.js b/src/forge/Settings/Collaborator.js
index 0b94eee5b..0a50cae10 100644
--- a/src/forge/Settings/Collaborator.js
+++ b/src/forge/Settings/Collaborator.js
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React, { useState , useRef } from "react";
import {WhiteBack} from '../Component/layout';
import AddMember from '../Component/AddMember';
import AddGroup from '../Component/AddGroup';
@@ -8,9 +8,11 @@ import Group from './CollaboratorGroup';
function Collaborator(props){
const [ nav , setNav] = useState("1");
const [ newId , setNewId] = useState(undefined);
+ const [ addOperation , setAddOperation] = useState(true);
const [ newGroupId , setNewGroupId] = useState(undefined);
const {projectsId ,owner} = props.match.params;
+
const author = props && props.projectDetail && props.projectDetail.author;
function getID(id){
@@ -19,6 +21,7 @@ function Collaborator(props){
function getGroupID(id){
setNewGroupId(id);
}
+
return (
@@ -27,15 +30,17 @@ function Collaborator(props){
author && author.type === "Organization" ?
{setNav("1");setNewId(undefined)}}>协作者管理
- {setNav("2");setNewId(undefined)}}>团队管理
+ {setNav("2");setNewId(undefined);setNewGroupId(undefined)}}>团队管理
:
协作者管理
}
{
- nav === "1" ?
+ nav === "1" &&
- :
+ }
+ {
+ (nav !== "1" && addOperation) &&
}
@@ -44,7 +49,7 @@ function Collaborator(props){
nav === "1" ?
:
-
+
}
diff --git a/src/forge/Settings/CollaboratorGroup.jsx b/src/forge/Settings/CollaboratorGroup.jsx
index c6ab6ffbc..5c38b1aa7 100644
--- a/src/forge/Settings/CollaboratorGroup.jsx
+++ b/src/forge/Settings/CollaboratorGroup.jsx
@@ -10,7 +10,7 @@ const roles = {
read: "报告者",
};
const limit = 15;
-function CollaboratorGroup({ newGroupId, owner, projectsId }) {
+function CollaboratorGroup({ newGroupId, owner, projectsId , setAddOperation }) {
const [list, setList] = useState(undefined);
const [isSpin, setIsSpin] = useState(true);
const [page, setPage] = useState(1);
@@ -34,6 +34,7 @@ function CollaboratorGroup({ newGroupId, owner, projectsId }) {
setList(result.data.teams);
setTotal(result.data.total_count);
setIsSpin(false);
+ setAddOperation(result.data.can_add);
}
})
.catch((error) => {});
@@ -47,16 +48,15 @@ function CollaboratorGroup({ newGroupId, owner, projectsId }) {
// 添加团队
function addGroup(id) {
const url = `/${owner}/${projectsId}/teams.json`;
- axios
- .post(url, {
- team_id: id,
- })
- .then((result) => {
- if (result && result.data) {
- getData();
- }
- })
- .catch((error) => {});
+ axios.post(url, {
+ team_id: id,
+ })
+ .then((result) => {
+ if (result && result.data) {
+ getData();
+ }
+ })
+ .catch((error) => {});
}
// 删除团队
@@ -77,7 +77,11 @@ function CollaboratorGroup({ newGroupId, owner, projectsId }) {
title: "团队名",
dataIndex: "name",
render: (value, item) => {
- return {value};
+ if(item.is_admin || item.is_member){
+ return {value};
+ }else{
+ return {value};
+ }
},
},
{
diff --git a/src/forge/Settings/CollaboratorMember.jsx b/src/forge/Settings/CollaboratorMember.jsx
index 1104a8646..447e3b262 100644
--- a/src/forge/Settings/CollaboratorMember.jsx
+++ b/src/forge/Settings/CollaboratorMember.jsx
@@ -186,7 +186,7 @@ function CollaboratorMember({projectsId,owner,project_id,author,showNotification
render: (text, item) => (
(
-
+
{text}
),
diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js
index c8fd2f1ef..3ebb5b49a 100644
--- a/src/forge/Settings/Index.js
+++ b/src/forge/Settings/Index.js
@@ -49,25 +49,25 @@ class Index extends Component {
const { projectsId , owner } = this.props.match.params;
const { pathname } = this.props.history.location;
- const flag = pathname === `/projects/${owner}/${projectsId}/setting`;
+ const flag = pathname === `/${owner}/${projectsId}/settings`;
return (
-
-
+
基本设置
- -1 ? "active" : ""
+ pathname.indexOf("settings/collaborators") > -1 ? "active" : ""
}
>
-
+
协作者管理
@@ -75,11 +75,11 @@ class Index extends Component {
- -1 ? "active" : ""
+ pathname.indexOf("settings/webhooks") > -1 ? "active" : ""
}
>
-
+
Webhooks
@@ -87,21 +87,21 @@ class Index extends Component {
- -1 ? "active" : ""
+ pathname.indexOf("settings/branch") > -1 ? "active" : ""
}
>
-
+
分支设置
- -1 ? "active" : ""}
+ className={pathname.indexOf("settings/labels") > -1 ? "active" : ""}
>
-
+
项目标签
@@ -110,7 +110,7 @@ class Index extends Component {
{/*
- -1 ? "active" : ""
+ pathname.indexOf("settings/manage") > -1 ? "active" : ""
}
>
@@ -127,64 +127,64 @@ class Index extends Component {
{/* webhooks */}
(
)}
>
(
)}
>
(
)}
>
{/* 协作者 */}
(
)}
>
{/* 修改仓库信息 */}
(
)}
>
(
)}
>
(
)}
>
(
)}
>
(
)}
>
{/* 修改仓库信息 */}
(
)}
diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js
index ba6e7a5a7..c3150323f 100644
--- a/src/forge/Settings/Setting.js
+++ b/src/forge/Settings/Setting.js
@@ -16,7 +16,7 @@ const menu = [
{name:"合并请求",index:"pulls"},
{name:"Wiki",index:"wiki"},
{name:"工作流(beta版)",index:"devops"},
- {name:"资源库",index:"resources"},
+ // {name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"},
{name:"动态",index:"activity"},
]
@@ -179,11 +179,9 @@ class Setting extends Component {
content: 该操作无法撤销!且将会一并删除相关的易修、合并请求、工作流、里程碑、动态等数据。
是否确认删除 {owner}/{projectName}({projectsId})?,
onOk: () => {
const url = `/${owner}/${projectsId}.json`;
- axios
- .delete(url)
- .then((result) => {
+ axios.delete(url).then((result) => {
this.props.showNotification("仓库删除成功!");
- this.props.history.push("/projects");
+ this.props.history.push(`/${owner}`);
})
.catch((error) => {
console.log(error);
@@ -223,10 +221,14 @@ class Setting extends Component {
}
// 确定转移仓库
onSuccess=(owner)=>{
+ if(owner){
+ this.setState({
+ is_transfering:true,
+ transfer:owner
+ })
+ }
this.setState({
- is_transfering:true,
- divertVisible:false,
- transfer:owner
+ divertVisible:false
})
}
@@ -351,7 +353,7 @@ class Setting extends Component {
{
is_transfering ?
此仓库正在转移给【
- {transfer && {transfer.name}}
+ {transfer && {transfer.name}}
】,请联系对方接收此仓库。
:
`将此仓库转移给其他用户或组织`
diff --git a/src/forge/Settings/Webhooks/Index.jsx b/src/forge/Settings/Webhooks/Index.jsx
index c69922435..57df13b47 100644
--- a/src/forge/Settings/Webhooks/Index.jsx
+++ b/src/forge/Settings/Webhooks/Index.jsx
@@ -62,7 +62,7 @@ function Index(props) {
if(total >= 20){
return props.showNotification("webhooks数量已到上限!请删除暂不使用的webhooks以进行添加操作");
}
- props.history.push(`/projects/${owner}/${projectsId}/setting/webhooks/new`)
+ props.history.push(`/${owner}/${projectsId}/settings/webhooks/new`)
}
return(
@@ -90,9 +90,9 @@ function Index(props) {
return(
- {i.url}
+ {i.url}
-
+
diff --git a/src/forge/Settings/Webhooks/New.jsx b/src/forge/Settings/Webhooks/New.jsx
index 0dedaa831..d90934f04 100644
--- a/src/forge/Settings/Webhooks/New.jsx
+++ b/src/forge/Settings/Webhooks/New.jsx
@@ -111,7 +111,7 @@ function New({ form , match , showNotification , history }) {
}).then(result=>{
if(result){
showNotification("webhook更新成功!");
- history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
+ history.push(`/${owner}/${projectsId}/settings/webhooks`);
}
}).catch(error=>{})
}else{
@@ -125,7 +125,7 @@ function New({ form , match , showNotification , history }) {
}).then(result=>{
if(result && result.data && result.data.id){
showNotification("webhook新建成功!");
- history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
+ history.push(`/${owner}/${projectsId}/settings/webhooks`);
}
}).catch(error=>{})
}
@@ -157,7 +157,7 @@ function New({ form , match , showNotification , history }) {
axios.delete(url).then(result=>{
if(result){
showNotification("webhook删除成功!");
- history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
+ history.push(`/${owner}/${projectsId}/settings/webhooks`);
}
}).catch(error=>{})
}
@@ -180,7 +180,7 @@ function New({ form , match , showNotification , history }) {
subTitle={`删除后未来事件将不会推送至此Webhook地址:${data && data.url}`}
/>
- Webhooks
+ Webhooks
{id ? "更新" : "添加"}Webhook
diff --git a/src/forge/Source/Index.jsx b/src/forge/Source/Index.jsx
index 8ba925878..e158d7fba 100644
--- a/src/forge/Source/Index.jsx
+++ b/src/forge/Source/Index.jsx
@@ -217,7 +217,7 @@ function Index(props){
data.map((item,key)=>{
return(
-
-
+
diff --git a/src/forge/Team/Group/GroupDetailProject.jsx b/src/forge/Team/Group/GroupDetailProject.jsx
index 0c843f0af..20284c9fd 100644
--- a/src/forge/Team/Group/GroupDetailProject.jsx
+++ b/src/forge/Team/Group/GroupDetailProject.jsx
@@ -31,7 +31,7 @@ export default (({projects}) => {
return (
-
{item.project.name}
+
{item.project.name}
)
})
diff --git a/src/forge/Team/Group/GroupDetailSetting.jsx b/src/forge/Team/Group/GroupDetailSetting.jsx
index fa060ee33..168ba6ff4 100644
--- a/src/forge/Team/Group/GroupDetailSetting.jsx
+++ b/src/forge/Team/Group/GroupDetailSetting.jsx
@@ -26,18 +26,18 @@ export default (props)=>{
function returnActive (pathname){
let a = 0;
- if(pathname === `/organize/${OIdentifier}/group/${groupId}/setting/member`){
+ if(pathname === `/${OIdentifier}/teams/${groupId}/setting/member`){
a = 1;
- }else if(pathname === `/organize/${OIdentifier}/group/${groupId}/setting/project`){
+ }else if(pathname === `/${OIdentifier}/teams/${groupId}/setting/project`){
a = 2;
}
return a;
}
const active = returnActive(pathname);
const array = {list:[
- {name:'基本设置',icon:"icon-base",href:`/organize/${OIdentifier}/group/${groupId}/setting`},
- {name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/organize/${OIdentifier}/group/${groupId}/setting/member`},
- {name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/organize/${OIdentifier}/group/${groupId}/setting/project`},
+ {name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/teams/${groupId}/setting`},
+ {name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/teams/${groupId}/setting/member`},
+ {name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/teams/${groupId}/setting/project`},
],
active
}
@@ -51,19 +51,19 @@ export default (props)=>{
(
)}
>
(
)}
>
(
)}
diff --git a/src/forge/Team/Group/GroupDetails.jsx b/src/forge/Team/Group/GroupDetails.jsx
index 75183f354..ba5693865 100644
--- a/src/forge/Team/Group/GroupDetails.jsx
+++ b/src/forge/Team/Group/GroupDetails.jsx
@@ -87,9 +87,9 @@ export default ((props) => {
if (username) {
const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/quit.json`;
axios.delete(url).then((result) => {
- if (result && result.data) {
+ if (result && result.message==='success') {
props.showNotification(`已成功退出团队!`);
- props.history.push(`/organize/${OIdentifier}`);
+ props.history.push(`/${username}`);
}
}).catch((error) => { });
}
@@ -119,7 +119,7 @@ export default ((props) => {
管理员团队对 所有仓库 具有操作权限,且对组织具有 管理员权限。
此外,该团队拥有了 创建仓库 的权限:成员可以在组织中创建新的仓库。
- {group.is_admin ?
: ""}
+ {group.is_admin ?
: ""}
:
diff --git a/src/forge/Team/Group/GroupForm.jsx b/src/forge/Team/Group/GroupForm.jsx
index 2eb8540f9..94825905f 100644
--- a/src/forge/Team/Group/GroupForm.jsx
+++ b/src/forge/Team/Group/GroupForm.jsx
@@ -24,21 +24,25 @@ export default Form.create()(
const [check_box, setCheckBox] = useState(false);
const [switch_box, setSwtichBox] = useState([]);
const [onwers, setOnwers] = useState(false);
+ const [auth, setAuth] = useState("");
const [ descNum , setDescNum ] = useState(0);
const [switch_box_code, setSwtichBoxCode] = useState(false);
const [switch_box_pull, setSwtichBoxPull] = useState(false);
const [switch_box_issue, setSwtichBoxIssue] = useState(false);
const [switch_box_release, setSwtichBoxRelease] = useState(false);
+ const [switch_box_wiki, setSwtichBoxWiki] = useState(false);
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const { OIdentifier, groupId } = match.params;
useEffect(() => {
if (GroupDetail) {
setOnwers(GroupDetail.authorize === "owner");
+ setAuth(GroupDetail.authorize);
setCheckBox(GroupDetail.can_create_org_project)
setSwtichBox(GroupDetail.units)
setFieldsValue({
- ...GroupDetail
+ ...GroupDetail,
+ includes_all_project:GroupDetail.includes_all_project ? 1 :0
})
setDescNum(GroupDetail.description ? GroupDetail.description.length : 0);
}
@@ -50,6 +54,7 @@ export default Form.create()(
setSwtichBoxPull(switch_checked("pulls"))
setSwtichBoxIssue(switch_checked("issues"))
setSwtichBoxRelease(switch_checked("releases"))
+ setSwtichBoxWiki(switch_checked("wiki"))
}
}, [switch_box])
@@ -68,25 +73,28 @@ export default Form.create()(
setIsSpin(true)
validateFields((error, values) => {
if (!error) {
- values.unit_types = switch_box
+ // values.unit_types = switch_box
+ values.unit_types = ['code','pulls','issues','releases','wiki'];
if (groupId) { // 表示编辑,否则为新建
const url = `/organizations/${OIdentifier}/teams/${groupId}.json`;
axios.put(url, {
- ...values
+ ...values,
+ includes_all_project:values.includes_all_project === 1?true:false
}).then(result => {
if (result && result.data) {
showNotification("基本设置更新成功!");
- history.push(`/organize/${OIdentifier}/group/${groupId}`);
+ history.push(`/${OIdentifier}/teams/${groupId}`);
}
}).catch(error => { })
} else {
const url = `/organizations/${OIdentifier}/teams.json`;
axios.post(url, {
- ...values
+ ...values,
+ includes_all_project:values.includes_all_project === 1?true:false
}).then(result => {
if (result && result.data) {
showNotification("团队创建成功!");
- history.push(`/organize/${OIdentifier}/group/${result.data.id}`);
+ history.push(`/${OIdentifier}/teams/${result.data.id}`);
}
}).catch(error => { })
}
@@ -132,14 +140,22 @@ export default Form.create()(
setSwtichBoxRelease(checked)
}
+ function switch_wiki_types(checked, event) {
+ switch_unit_types(checked, "wiki");
+ setSwtichBoxWiki(checked);
+ }
+
function cancelEdit(){
if(groupId){
- history.push(`/organize/${OIdentifier}/group/${groupId}`);
+ history.push(`/${OIdentifier}/teams/${groupId}`);
}else{
- history.push(`/organize/${OIdentifier}`);
+ history.push(`/${OIdentifier}`);
}
}
+ function changeAuth(params) {
+ setAuth(params.target.value)
+ }
function checkname(rule, value, callback){
if(!value){
@@ -192,8 +208,8 @@ export default Form.create()(
"includes_all_project",
[],
- 指定项目(团队成员将只能访问添加到团队的项目。 选择此项 将不会 自动删除已经添加的项目)
- 所有项目(团队可以访问所有项目。选择此选项将 添加所有现有的 项目到指定团队)
+ 指定项目(团队成员将只能访问添加到团队的项目。 选择此项 将不会 自动删除已经添加的项目)
+ 所有项目(团队可以访问所有项目。选择此选项将 添加所有现有的 项目到指定团队)
, false, 0,onwers ? "hide":""
)}
{helper(
@@ -202,37 +218,42 @@ export default Form.create()(
[],
新建项目(成员可以在组织中新建项目。创建者将自动获得新建的项目的管理员权限), false, 20,onwers ? "hide":""
)}
- {/* {helper(
+ {helper(
'版本库权限:',
"authorize",
[],
-
+
读取权限(成员可以查看和克隆团队项目)
写入权限(成员可以查看和推送提交到团队项目)
管理员权限(成员可以拉取和推送到团队项目同时可以添加协作者)
, false, 20,onwers ? "hide":""
- )} */}
+ )}
- {/* 允许访问项目单元:
-
-
- 代码库(查看源码、文件、提交和分支)
-
-
-
- 任务(组织 bug 报告、任务和里程碑)
-
-
-
- 合并请求(启用合并请求和代码评审)
-
-
-
- 版本发布(跟踪项目版本和下载)
-
- */}
+ {/*
+
允许访问项目单元:
+
+
+ 代码库(查看源码、文件、提交和分支)
+
+
+
+ 任务(组织 bug 报告、任务和里程碑)
+
+
+
+ 合并请求(启用合并请求和代码评审)
+
+
+
+ 版本发布(跟踪项目版本和下载)
+
+
+
+ wiki(编辑此仓库的相关文档说明)
+
+
*/}
- cancelEdit()}>取消
+ cancelEdit()}>取消
diff --git a/src/forge/Team/Group/Setting/GroupMemberSetting.jsx b/src/forge/Team/Group/Setting/GroupMemberSetting.jsx
index a0d8ec781..998e73390 100644
--- a/src/forge/Team/Group/Setting/GroupMemberSetting.jsx
+++ b/src/forge/Team/Group/Setting/GroupMemberSetting.jsx
@@ -87,7 +87,7 @@ export default ((props) => {
align: "center",
render: (value, item) => {
return (
-
{item.user.name}
+
{item.user.name}
)
}
},
diff --git a/src/forge/Team/Group/Setting/GroupProjectSetting.jsx b/src/forge/Team/Group/Setting/GroupProjectSetting.jsx
index 1762a8648..9a4f39582 100644
--- a/src/forge/Team/Group/Setting/GroupProjectSetting.jsx
+++ b/src/forge/Team/Group/Setting/GroupProjectSetting.jsx
@@ -180,7 +180,7 @@ function GroupProjectSetting(props) {
}
>
{item.project.owner_name}/{item.project.name}}
+ title={{item.project.owner_name}/{item.project.name}}
/>
)}
diff --git a/src/forge/Team/Index.jsx b/src/forge/Team/Index.jsx
index fd4afedf6..1a3bfde99 100644
--- a/src/forge/Team/Index.jsx
+++ b/src/forge/Team/Index.jsx
@@ -26,39 +26,16 @@ const SubDetailIndex = Loadable({
loader: () => import("./Sub/SubDetail"),
loading: Loading,
});
+// forge项目详情
+const ProjectDetail = Loadable({
+ loader: () => import("../Main/Detail"),
+ loading: Loading,
+});
export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(
((props)=>{
return (
- {/* 组织团队-设置 */}
- {
- return
- }}
- >
- {/* 组织团队-新建 */}
- {
- return
- }}
- >
- {/* 组织团队-子级(包含组织团队列表) */}
- {
- return
- }}
- >
- {/* 组织成员 */}
- {
- return
- }}
- >
{/* 新建组织 */}
}}
>
+ {/* 组织团队-新建 */}
+ {
+ return
+ }}
+ >
+ {/* 组织团队-设置 */}
+ {
+ return
+ }}
+ >
+ {/* 组织团队-子级(包含组织团队列表) */}
+ {
+ return
+ }}
+ >
+ {/* 组织成员 */}
+ {
+ return
+ }}
+ >
+
+
{/* 组织详情(包含组织设置) */}
(
+
+ )}
+ >
+
+ {/* 组织下的项目详情 */}
+ (
+
+ )}
+ >
+
+ {/* 组织详情(包含组织设置) */}
+ (
)}
diff --git a/src/forge/Team/Index.scss b/src/forge/Team/Index.scss
index a046f99d8..112379734 100644
--- a/src/forge/Team/Index.scss
+++ b/src/forge/Team/Index.scss
@@ -368,5 +368,5 @@
}
}
.hide{
- display: hidden;
+ display: none;
}
\ No newline at end of file
diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx
index b43fb75d1..7e64c5de2 100644
--- a/src/forge/Team/List.jsx
+++ b/src/forge/Team/List.jsx
@@ -6,6 +6,7 @@ import './Index.scss';
import Item from './ListItem';
import Right from './RightBox';
import NoData from '../Nodata';
+import CheckProfile from '../Component/ProfileModal/Profile';
import { Menu , Pagination , Dropdown , Spin } from 'antd';
import axios from 'axios';
@@ -61,8 +62,12 @@ function List(props){
)
const menu_new=(
)
@@ -75,7 +80,7 @@ function List(props){
- { organizeDetail && organizeDetail.is_admin ?
+ { organizeDetail && organizeDetail.can_create_project ?
+ 新建项目
@@ -106,7 +111,13 @@ function List(props){
}
-
+
)
}
diff --git a/src/forge/Team/ListItem.jsx b/src/forge/Team/ListItem.jsx
index 3c2cf3f41..a908f80bb 100644
--- a/src/forge/Team/ListItem.jsx
+++ b/src/forge/Team/ListItem.jsx
@@ -7,7 +7,7 @@ function ListItem({item,key,OIdentifier}) {