Merge branch 'develop' of http://git.trustie.net/jasder/forgeplus-react into develop

This commit is contained in:
dinglink 2020-03-20 23:48:20 +08:00
commit 1b89e542ff
2 changed files with 3 additions and 12 deletions

View File

@ -1,12 +1,8 @@
import React , { Component } from 'react';
import { Dropdown , Icon , Menu } from 'antd';
import "./branch.css"
import { Dropdown , Icon } from 'antd';
import "./branch.css";
class CloneAddress extends Component{
constructor(props){
super(props);
}
// 点击按钮复制功能
jsCopy=()=>{
var e = document.getElementById("copy_rep_content");

View File

@ -203,7 +203,6 @@ class Detail extends Component{
const url = `/projects/${project_id}/watchers/follow.json`;
axios.post(url).then(result=>{
if(result && result.data.status === 0){
this.props.showNotification('关注成功');
this.getDetail();
}
}).catch(error=>{
@ -213,7 +212,6 @@ class Detail extends Component{
const url = `/projects/${project_id}/watchers/unfollow.json`;
axios.delete(url).then(result=>{
if(result && result.data.status === 0){
this.props.showNotification('取消关注成功');
this.getDetail();
}
}).catch(error=>{
@ -229,7 +227,6 @@ class Detail extends Component{
const url = `/projects/${project_id}/praise_tread/like.json`;
axios.post(url).then(result=>{
if(result && result.data.status === 0){
this.props.showNotification('点赞成功');
this.getDetail();
}
}).catch(error=>{
@ -239,7 +236,6 @@ class Detail extends Component{
const url = `/projects/${project_id}/praise_tread/unlike.json`;
axios.delete(url).then(result=>{
if(result && result.data.status === 0){
this.props.showNotification('取消点赞成功');
this.getDetail();
}
}).catch(error=>{
@ -250,7 +246,6 @@ class Detail extends Component{
// fork项目
forkFunc=()=>{
const { author } = this.props.match.params;
const { project_id } = this.state;
const url = `/projects/${project_id}/forks.json`;
axios.post(url).then(result=>{
@ -304,7 +299,7 @@ class Detail extends Component{
{projectDetail && projectDetail.author && projectDetail.author.name}
<span className="ml5 mr5">/</span>
<span className="hide-1 flex-1">
<Link to={`/projects/${projectsId}/coders`} className="color-white">{ projectDetail && projectDetail.identifier }</Link>
<Link to={`/projects/${projectsId}/coders`} className="color-white">{ projectDetail && projectDetail.name }</Link>
</span>
</p>
</div>