From cd5f5ed04f80491ae856551ef6125d76433eab11 Mon Sep 17 00:00:00 2001
From: caicai8 <1149225589@qq.com>
Date: Fri, 24 Apr 2020 10:38:19 +0800
Subject: [PATCH 1/2] changeBranch
---
src/forge/Branch/SelectBranch.js | 7 +++----
src/forge/Main/CoderRootDirectory.js | 23 +++++++++++------------
2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/src/forge/Branch/SelectBranch.js b/src/forge/Branch/SelectBranch.js
index 77edb8254..85ae9040f 100644
--- a/src/forge/Branch/SelectBranch.js
+++ b/src/forge/Branch/SelectBranch.js
@@ -1,5 +1,5 @@
import React , { Component } from 'react';
-import { Dropdown , Icon , Menu } from 'antd';
+import { Dropdown , Icon , Input } from 'antd';
import "./branch.css"
@@ -59,16 +59,15 @@ class SelectBranch extends Component{
const { branchs , branch } = this.props;
let branchsFilter = value ? (branchs && branchs.length>0 && branchs.filter(item=>item.name.indexOf(value)>-1)):branchs;
-
+ console.log("value",value);
const menu = (
-
+
changeBranch(value)}>{item.name}
)
})
}
diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js
index 207f3d324..ef2d52e9c 100644
--- a/src/forge/Main/CoderRootDirectory.js
+++ b/src/forge/Main/CoderRootDirectory.js
@@ -256,24 +256,23 @@ class CoderRootDirectory extends Component{
const { branchList } = this.props;
let branchLastCommit = branchList && branchList.length >0 && branchList.filter(item=>item.name === value)[0];
- this.setState({
- branch:branchLastCommit && branchLastCommit.name,
- branchLastCommit,
- http_url:branchLastCommit && branchLastCommit.http_url,
- isSpin: true
- })
if(branchLastCommit){
- const { pathname } = this.props.location;
- if(pathname && pathname.indexOf("?url=")>-1){
- let url =pathname.split("?url=")[1];
+ this.setState({
+ branch:value,
+ branchLastCommit,
+ http_url:branchLastCommit && branchLastCommit.http_url,
+ isSpin: true
+ })
+ let { search } = this.props.history.location;
+ if(search && search.indexOf("?url=")>-1){
+ let url =search.split("?url=")[1];
this.setState({
filePath:url
})
- this.getFileDetail(url, branchLastCommit.name);
+ this.getFileDetail(url, value);
}else{
- this.getProjectRoot( branchLastCommit.name );
+ this.getProjectRoot( value );
}
- // this.props.history.location.search.replace( branchLastCommit.name );
}
}
render(){
From 76c7ec84d9cf83f4a01c66c497bdffedcf650db9 Mon Sep 17 00:00:00 2001
From: caicai8 <1149225589@qq.com>
Date: Fri, 24 Apr 2020 10:43:22 +0800
Subject: [PATCH 2/2] =?UTF-8?q?issue=E5=88=86=E5=89=B2=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Order/order.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css
index de328091d..48afc9232 100644
--- a/src/forge/Order/order.css
+++ b/src/forge/Order/order.css
@@ -198,11 +198,11 @@
display: flex;
flex-wrap: wrap;
align-content: center;
- border-bottom:1px dashed #f4f4f4;
+ border-bottom:1px dashed #cecdcd;
padding:16px 0px;
}
.issueItem:first-child{
- border-top:1px dashed #f4f4f4;
+ border-top:1px dashed #cecdcd;
}
.issueNo{
padding:0px 5px;