diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 07d9617ff..1baa204ef 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import { Spin, Tooltip } from 'antd';
+import { Spin, Tooltip , Button } from 'antd';
import { Link, Route, Switch } from 'react-router-dom';
import { withRouter } from "react-router";
import { connect } from 'react-redux';
@@ -17,6 +17,7 @@ import '../css/index.scss'
import './list.scss';
import '../../modules/courses/css/Courses.css'
import { ImageLayerOfCommentHOC } from "../../modules/page/layers/ImageLayerOfCommentHOC";
+import { unInstallMarketBot } from "../../softbot/api";
import Loadable from 'react-loadable';
@@ -590,6 +591,25 @@ class Detail extends Component {
: ""
}
+ // 删除仓库
+ deleteProject = () => {
+ const { projectsId , owner } = this.props.match.params;
+ const { projectName } = this.state;
+ this.props.confirm({
+ content: 该操作无法撤销!且将会一并删除相关的疑修、合并请求、工作流、里程碑、动态等数据。
是否确认删除 {owner}/{projectName}({projectsId})?,
+ onOk: () => {
+ const url = `/${owner}/${projectsId}.json`;
+ axios.delete(url).then((result) => {
+ window.scrollTo(0,0);
+ this.props.showNotification("仓库删除成功!");
+ this.props.history.push(`/${owner}`);
+ })
+ .catch((error) => {
+ console.log(error);
+ });
+ },
+ });
+ };
render() {
const { projectDetail, watchers_count, praises_count,
@@ -732,6 +752,9 @@ class Detail extends Component {
firstSync &&
+
}
diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss
index ae45f0c79..ffcc86b90 100644
--- a/src/forge/Main/list.scss
+++ b/src/forge/Main/list.scss
@@ -211,6 +211,7 @@
}
.spincontent{
height:400px;
+ flex-direction: column;
}
.spinstyle .ant-spin-text{
margin-top:30px;
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss
index 715764421..0dfc98602 100644
--- a/src/forge/css/index.scss
+++ b/src/forge/css/index.scss
@@ -438,4 +438,17 @@ button.btngrey{
background-color:#708cff;
border-color:#708cff;
}
+}
+.red_deleteBtn{
+ display: block;
+ height: 38px;
+ line-height: 36px;
+ border:1px solid #db2828;
+ border-radius: 4px;
+ color: #db2828!important;
+ padding:0px 15px;
+ font-size: 16px;
+ &:hover{
+ border-color:#db2828!important;
+ }
}
\ No newline at end of file