diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 2753398dd..228f75c67 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -62,6 +62,7 @@ function CoderDepot(props){ branchName = returnbar(branchName); const details = props.projectDetail; let pathname = props.history.location.pathname; + const { platform } = props ; //distribution:判断此用户是否可以创建发行版 const distribution = details && details.type !== 2 && ( details.permission && details.permission !== "Reporter"); const { bannerList } = props; @@ -139,17 +140,19 @@ function CoderDepot(props){ },[projectsId,owner,pathname,defaultBranch]) useEffect(()=>{ - setReadOnly(props.history.location.search.indexOf('edit') !== -1); - axios.get(`/${owner}/${projectsId}/releases.json`).then((result)=>{ - if(result && result.data){ - const release = { - "list":result.data.releases, - "total_count":result.data.releases && result.data.releases.length + if(platform){ + setReadOnly(props.history.location.search.indexOf('edit') !== -1); + axios.get(`/${owner}/${projectsId}/releases.json`).then((result)=>{ + if(result && result.data){ + const release = { + "list":result.data.releases, + "total_count":result.data.releases && result.data.releases.length + } + setReleaseVersions(release); } - setReleaseVersions(release); - } - }) - },[]) + }) + } + },[platform]) // 获取readme信息 function getReadmeInfo(path, ref) { @@ -623,7 +626,7 @@ function CoderDepot(props){ } {/* 发布 */} { - releaseVersions && props.platform && + releaseVersions && { this.getProject(); let history = this.props.location; diff --git a/src/forge/Main/version/version.js b/src/forge/Main/version/version.js index 1c233dc2b..c5350ab05 100644 --- a/src/forge/Main/version/version.js +++ b/src/forge/Main/version/version.js @@ -144,7 +144,7 @@ function version(props) { } else if (releases && releases.length === 0) { return ( ) diff --git a/src/forge/Merge/Index.scss b/src/forge/Merge/Index.scss index e0460902e..c50c810cc 100644 --- a/src/forge/Merge/Index.scss +++ b/src/forge/Merge/Index.scss @@ -108,4 +108,8 @@ margin-top: 60px; padding-top: 20px; border-top: 1px solid #F3F4F6; +} +.mergeBox{ + margin:0px auto; + width: 1200px; } \ No newline at end of file diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js index 794ae9138..e17f8b313 100644 --- a/src/forge/Merge/merge.js +++ b/src/forge/Merge/merge.js @@ -49,6 +49,7 @@ class merge extends Component { assigned_to_ids: "审查人员", paix: "排序", priority_ids: "优先级", + has_created_pull_requests:false, select_params: { status_type: "1", //开启中和关闭中,默认为开启中的 assigned_to_id: undefined, // 指派人 @@ -113,6 +114,7 @@ class merge extends Component { issues: result.data.issues, search_count: result.data.search_count, isSpin: false, + has_created_pull_requests:result.data.has_created_pull_requests }); } }) @@ -247,7 +249,7 @@ class merge extends Component { data, isSpin, status_type, - select_params, + select_params,has_created_pull_requests } = this.state; const menu = ( this.getMenu(e)}> @@ -266,8 +268,8 @@ class merge extends Component { ); return ( -
-
+
+
{data && data.search_count && data.search_count > 0 ? ( -
+
:""} + { data && data.issues && data.issues.length === 0 ? + + :"" + }
diff --git a/src/forge/Merge/no_data.js b/src/forge/Merge/no_data.js index c54e4bda4..4ae6d017b 100644 --- a/src/forge/Merge/no_data.js +++ b/src/forge/Merge/no_data.js @@ -3,22 +3,26 @@ import { Link } from "react-router-dom"; import None from '../Images/emp.png' class Nodata extends Component{ render(){ - const { _html, projectsId , owner , user_admin_or_developer , defaultBranch} = this.props; + const { has_created_pull_requests , projectsId , owner , user_admin_or_developer , defaultBranch} = this.props; return(
- {/* */} - + {/* */} +
-

欢迎使用合并请求!

- -
- 合并请求可以帮助您与他人协作编写代码。请先创建一个合并请求 -
- { user_admin_or_developer && -
- 合并请求 + { + !has_created_pull_requests && +
+

欢迎使用合并请求!

+
+ 合并请求可以帮助您与他人协作编写代码。请先创建一个合并请求 +
+ { user_admin_or_developer && +
+ 去创建合并请求 +
+ }
}
diff --git a/src/forge/Order/index.scss b/src/forge/Order/index.scss index 617423312..5d594f5ab 100644 --- a/src/forge/Order/index.scss +++ b/src/forge/Order/index.scss @@ -1,9 +1,14 @@ .screenWrap{ background:#fafcff; - border-top:1px solid rgba(221,221,221,1); - border-bottom:1px solid rgba(221,221,221,1); + border:1px solid rgba(42, 97, 255, 0.23); padding-left: 20px; box-sizing: border-box; + border-radius: 4px 4px 0px 0px; +} +.mergeData{ + border:1px solid #d0d0d0; + border-top: none; + border-radius: 0px 0px 2px 2px; } .attachment-list-div:hover { background-color: #e6f7ff; diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index bd48b868c..a8f269b34 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -163,6 +163,10 @@ ul,ol,dl{ text-align: center; min-height: 320px; padding:40px 0px; + border:1px solid rgba(42, 97, 255, 0.23); + border-top: none; + border-radius: 0px 0px 2px 2px; + margin-bottom: 50px; display: flex; justify-content: center; align-items: center;