From 68caf0751ea041d60bf3f8b41f3d0976117a2bc2 Mon Sep 17 00:00:00 2001 From: caishi Date: Sat, 9 Oct 2021 17:33:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Diff.jsx | 8 +++++++- src/forge/Merge/Files.jsx | 5 ++++- src/forge/Merge/MessageCount.js | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index 86cf9384c..17535e43b 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -42,6 +42,12 @@ const Infos = styled.div` } } `; +function turnbar(str){ + if(str && str.length>0 && str.indexOf("/")>-1){ + return str.replaceAll('/','%2F'); + } + return str; +} //提交详情页 export default (props) => { const {match , history } = props; @@ -81,7 +87,7 @@ export default (props) => { {commit && commit.message &&
{commit.message}
} - {data.branch} + {data.branch} diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index a3015fcec..172038b21 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -100,7 +100,10 @@ function Files({ data,history,owner,projectsId , parentsSha }){ {item.addition+item.deletion}处 - {history.push(`/${owner}/${projectsId}${item.isDeleted ? `/commits/${truncateCommitId(parentsSha)}`:`/tree/${truncateCommitId(item.sha)}/${item.name}`}`)}}>查看文件 + { + !item.isSubmodule && + {history.push(`/${owner}/${projectsId}${item.isDeleted ? `/commits/${truncateCommitId(parentsSha)}`:`/tree/${truncateCommitId(item.sha)}/${item.name}`}`)}}>查看文件 + } { diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index b064e3c2f..8f78c0934 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -364,7 +364,7 @@ class MessageCount extends Component { to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`} className="ver-middle" > - {data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {turnbar(data.pull_request && data.pull_request.head)} + {data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {data.pull_request && data.pull_request.head} From 9be6116cb823d434c25898658f243b6d7c6ef0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Sat, 9 Oct 2021 18:01:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9F=A5=E7=9C=8B=E6=96=87=E4=BB=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/merge.css | 6 +++++- src/forge/Merge/merge_footer.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/forge/Merge/merge.css b/src/forge/Merge/merge.css index 088874c19..d5ce68d19 100644 --- a/src/forge/Merge/merge.css +++ b/src/forge/Merge/merge.css @@ -208,4 +208,8 @@ form .ant-cascader-picker, form .ant-select { } .linesContent.add{ background: rgba(48, 232, 132, 0.15); -} \ No newline at end of file +} + +.mergeRequest .folders{ + width: 72rem; + } \ No newline at end of file diff --git a/src/forge/Merge/merge_footer.js b/src/forge/Merge/merge_footer.js index 6502827cd..5e3a75560 100644 --- a/src/forge/Merge/merge_footer.js +++ b/src/forge/Merge/merge_footer.js @@ -119,7 +119,7 @@ class MergeFooter extends Component { return ( !footer_type && !comparesData || (comparesData && ((comparesData.commits && comparesData.commits.length===0)||(comparesData && !comparesData.diff)) )?"": -
+