From b2eca51bd82985f887e009a25c2cedbd5f79d9cd Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 19 Nov 2020 09:45:54 +0800 Subject: [PATCH 1/4] merge.css not found --- public/css/merge.css | 111 +++++++++++++++++++++++++++++++++++++++++++ public/index.html | 1 + 2 files changed, 112 insertions(+) create mode 100755 public/css/merge.css diff --git a/public/css/merge.css b/public/css/merge.css new file mode 100755 index 00000000..b6d923ce --- /dev/null +++ b/public/css/merge.css @@ -0,0 +1,111 @@ + +.CodeMirror-merge { + position: relative; + white-space: pre; +} + +.CodeMirror-merge, .CodeMirror-merge .CodeMirror { + min-height:50px; +} + +.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; } +.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; } +.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; } +.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; } + +.CodeMirror-merge-pane { + display: inline-block; + white-space: normal; + vertical-align: top; +} +.CodeMirror-merge-pane-rightmost { + position: absolute; + right: 0px; + z-index: 1; +} + +.CodeMirror-merge-gap { + z-index: 2; + display: inline-block; + height: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + position: relative; + background: #515151; +} + +.CodeMirror-merge-scrolllock-wrap { + position: absolute; + bottom: 0; left: 50%; +} +.CodeMirror-merge-scrolllock { + position: relative; + left: -50%; + cursor: pointer; + color: #d8d8d8; + line-height: 1; +} + +.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right { + position: absolute; + left: 0; top: 0; + right: 0; bottom: 0; + line-height: 1; +} + +.CodeMirror-merge-copy { + position: absolute; + cursor: pointer; + color: #ce374b; + z-index: 3; +} + +.CodeMirror-merge-copy-reverse { + position: absolute; + cursor: pointer; + color: #44c; +} + +.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; } +.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; } + +.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==); + background-position: bottom left; + background-repeat: repeat-x; +} + +.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==); + background-position: bottom left; + background-repeat: repeat-x; +} + +.CodeMirror-merge-r-chunk { background: #9a6868; } +.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */} +.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */} +.CodeMirror-merge-r-connect { fill:#9a6868;} + +.CodeMirror-merge-l-chunk { background: #eef; } +.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; } +.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; } +.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; } + +.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; } +.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; } +.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; } + +.CodeMirror-merge-collapsed-widget:before { + content: "(...)"; +} +.CodeMirror-merge-collapsed-widget { + cursor: pointer; + color: #88b; + background: #eef; + border: 1px solid #ddf; + font-size: 90%; + padding: 0 3px; + border-radius: 4px; +} +.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; } diff --git a/public/index.html b/public/index.html index 1969fa0e..96c70b2d 100755 --- a/public/index.html +++ b/public/index.html @@ -30,6 +30,7 @@
+ From ac5b50c26dd87e6b90b7d945ab719dbd75c557c9 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 23 Nov 2020 10:14:29 +0800 Subject: [PATCH 2/4] detail --- public/index.html | 15 +++------------ src/forge/Main/CoderRootDirectory.js | 1 - src/forge/Order/order.js | 22 ++++++++++------------ 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/public/index.html b/public/index.html index 96c70b2d..f039d86e 100755 --- a/public/index.html +++ b/public/index.html @@ -8,18 +8,9 @@ - - - + + + <%= htmlWebpackPlugin.tags.headTags %> diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index 507fa48a..521c72f2 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -551,7 +551,6 @@ class CoderRootDirectory extends Component { { !rootList && !fileDetail &&定义DevOps工作流,帮助您检测bug、发布代码…
+ { + CurrentLogin !== AuthorLogin && (step === undefined || (step && step < 1)) && +
{item.last_commit && truncateCommitId(item.last_commit.sha)}
{item.last_commit && item.last_commit.message}
diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js
index 36585fe3..ddb47a2b 100644
--- a/src/forge/Main/CoderRootCommit.js
+++ b/src/forge/Main/CoderRootCommit.js
@@ -12,7 +12,6 @@ class CoderRootCommit extends Component{
constructor(props){
super(props)
this.state={
- branch:"master",
commitDatas:undefined,
dataCount:undefined,
limit:20,
@@ -22,11 +21,23 @@ class CoderRootCommit extends Component{
}
componentDidMount=()=>{
- const { branch , page , limit } = this.state;
+ this.Init();
+ }
+
+ componentDidUpdate=(prevProps)=>{
+ const { location } = this.props;
+ const prevlocation = prevProps && prevProps.location;
+ if (location !== prevlocation) {
+ this.Init();
+ }
+ }
+ Init =()=>{
+ const { branchName } = this.props.match.params;
+ const { page , limit } = this.state;
this.setState({
isSpining:true
})
- this.getCommitList( branch , page , limit );
+ this.getCommitList( branchName , page , limit );
}
getCommitList=(branch , page , limit)=>{
@@ -68,26 +79,28 @@ class CoderRootCommit extends Component{
// 切换分支 search:tag为根据标签搜索
changeBranch=(value)=>{
- const { page , limit } = this.state;
- const { getTopCount } = this.props;
- this.setState({
- isSpining:true,
- branch:value,
- })
- this.getCommitList(value , page , limit);
- getTopCount && getTopCount(value);
+ // const { page , limit } = this.state;
+ // const { getTopCount } = this.props;
+ // this.setState({
+ // isSpining:true,
+ // branch:value,
+ // })
+ // this.getCommitList(value , page , limit);
+ // getTopCount && getTopCount(value);
+ const { projectsId , owner } = this.props.match.params;
+ this.props.history.push(`/projects/${owner}/${projectsId}/commits/branch/${value}`);
}
ChangePage=(page)=>{
-
- const { branch , limit } = this.state;
- this.getCommitList(branch , page , limit);
+ const { branchName } = this.props.match.params;
+ const { limit } = this.state;
+ this.getCommitList(branchName , page , limit);
}
render(){
- const { branch , commitDatas , dataCount , limit , page , isSpining } = this.state;
- const { branchs , projectDetail, commit_class } = this.props;
- const { projectsId , owner } = this.props.match.params;
-
+ const { commitDatas , dataCount , limit , page , isSpining } = this.state;
+ const { projectDetail, commit_class } = this.props;
+ const { projectsId , owner , branchName } = this.props.match.params;
+ let branch = branchName || "master";
return(
{commit.message}
}
-
+
- + 分支设置