diff --git a/src/forge/Information/Pages/source.jsx b/src/forge/Information/Pages/source.jsx index c3839cd2..b48b8320 100644 --- a/src/forge/Information/Pages/source.jsx +++ b/src/forge/Information/Pages/source.jsx @@ -5,6 +5,7 @@ import { Link } from 'react-router-dom'; import axios from 'axios'; import { getSourceTypeList , getSourceList , getSourceZoneList } from '../api'; import Nodata from '../../Nodata'; +import ImgGreen from '../img/green_nodata.png'; import '../indexZone1.scss'; const { Search } = Input; @@ -83,36 +84,40 @@ function Source(props){ /> -
+
0) ? "flex-start":"center"}}>
-
    -

    资源领域

    -
    - { temp === "zone1" &&
  • setChooseZoneId(undefined)} className={!chooseZoneId ?"active":""}>全部
  • } - { - zoneList && zoneList.length>0&& - zoneList.map((i,k)=>{ - return( -
  • {setChooseZoneId(i.id === chooseZoneId ?undefined : i.id)}} className={chooseZoneId && chooseZoneId === i.id ? "active":"" }>{i.name}
  • - ) - }) - } -
    -
-
    -

    资源类别

    -
    - { temp === "zone1" &&
  • setChooseTypeId(undefined)} className={!chooseTypeId ?"active":""}>全部
  • } - { - typeList && typeList.length>0&& - typeList.map((i,k)=>{ - return( -
  • {setChooseTypeId(i.id === chooseTypeId ?undefined : i.id)}} className={chooseTypeId && chooseTypeId === i.id ? "active":"" }>{i.name}
  • - ) - }) - } -
    -
+ { + zoneList && zoneList.length>0&& +
    +

    资源领域

    +
    +
  • setChooseZoneId(undefined)} className={!chooseZoneId ?"active":""}>全部
  • + { + zoneList.map((i,k)=>{ + return( +
  • {setChooseZoneId(i.id)}} className={chooseZoneId && chooseZoneId === i.id ? "active":"" }>{i.name}
  • + ) + }) + } +
    +
+ } + { + typeList && typeList.length>0 && +
    +

    资源类别

    +
    +
  • setChooseTypeId(undefined)} className={!chooseTypeId ?"active":""}>全部
  • + { + typeList.map((i,k)=>{ + return( +
  • {setChooseTypeId(i.id)}} className={chooseTypeId && chooseTypeId === i.id ? "active":"" }>{i.name}
  • + ) + }) + } +
    +
+ }
@@ -142,7 +147,7 @@ function Source(props){ } {sourceList && sourceList.length === 0 &&
- +
} { diff --git a/src/forge/Information/Pages/sourceDetail.jsx b/src/forge/Information/Pages/sourceDetail.jsx index fec5bc5c..65a2f226 100644 --- a/src/forge/Information/Pages/sourceDetail.jsx +++ b/src/forge/Information/Pages/sourceDetail.jsx @@ -5,6 +5,7 @@ import RenderHtml from '../../../components/render-html'; import { getSourceDetail } from '../api'; import { Link } from 'react-router-dom'; import axios from 'axios'; +import { Base64 } from 'js-base64'; function SourceDetail(props){ @@ -57,7 +58,7 @@ function SourceDetail(props){
diff --git a/src/forge/Information/img/green_nodata.png b/src/forge/Information/img/green_nodata.png new file mode 100644 index 00000000..011e82a5 Binary files /dev/null and b/src/forge/Information/img/green_nodata.png differ diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 53782e39..037f7134 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -1226,7 +1226,13 @@ } } .zone_source_box{ - padding-top: 56px; + padding-bottom: 40px; + .source_h{ + background-color: rgba(240, 244, 255, 0.94); + padding:56px 0px; + box-sizing: border-box; + min-height: 278px; + } .source_search_box{ .ant-input-lg{ border-color: #fff; @@ -1235,20 +1241,30 @@ .sources{ display: flex; align-items: flex-start; - padding:45px 0px; + padding:40px 0px; + width: 1200px; + margin: 0px auto; + background-color: #f7f9fc; + border: 2px solid #ffffff; + border-radius: 4px; + margin-top: -70px; + box-sizing: border-box; + .ant-spin-nested-loading{ + flex: 1; + } .source_left_ul{ - width: 610px; - background-image:linear-gradient(89.9deg,#f5f7fa 0%,#f5f7fa 70.54%,rgba(255, 255, 255, 0.97) 100%); display: flex; flex-direction: column; align-items: flex-end; padding:5px 0px; - margin-right: 6px; p,li{ height: 60px; line-height: 60px; padding-left: 34px; - width: 250px; + width: 215px; + } + p.borderRight{ + border-right: 2px solid #fff; } p{ font-weight:700; @@ -1268,9 +1284,6 @@ } } } - .s_m_list{ - width: 945px; - } .source_lists{ width: 100%; display: flex; @@ -1286,6 +1299,7 @@ background-image: url(./img/sourceCardBack.png); background-size: 100% 100%; border-radius: 2px; + box-shadow: 0px 0px 11px rgba(197, 197,197, 0.1); a.task-hide{ color:#1f2329; font-size:16px; diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 3f19e783..b41a161e 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -372,7 +372,7 @@ function CoderDepot(props){ // 如果项目是fork的项目,pr自动指向源仓库,否则指向本仓库默认分支 function compare() { if (projectDetail && projectDetail.fork_info) { - urlLink(`/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}/compare/${turnbar(branchName || defaultBranch)}...${owner + ':' + turnbar(branchName || defaultBranch)}`) + urlLink(`/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}/compare/${turnbar(branchName || defaultBranch)}...${owner +'/' + projectsId + ':' + turnbar(branchName || defaultBranch)}`) } else { urlLink(`/${owner}/${projectsId}/compare/${turnbar(defaultBranch)}...${turnbar(branchName || defaultBranch)}`); } diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index ffcd4537..e31a62df 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -51,7 +51,14 @@ function getBranchParams(pathname) { if (pullObj.indexOf(':') > -1) { // 存在源仓库 const [pullOwner, pullBranch] = pullObj.split(':'); - result.pullOwner = pullOwner; + if(pullOwner.indexOf("/")>-1){ + const [ ownerO , onwerP ] = pullOwner.split('/'); + result.pullOwner = ownerO; + result.pullIdentity = onwerP; + }else{ + result.pullOwner = pullOwner; + } + result.pullBranch = pullBranch; } else { result.pullBranch = pullObj; @@ -129,8 +136,8 @@ class CreateMerge extends Component { //获取新建合并请求数据 getMergeInfo = (branchParams,init) => { this.setState({ isSpin: true }); - const { pullOwner, pullBranch, mergeOwner, mergeBranch, projectId } = branchParams; - const url = `/${pullOwner}/${projectId}/pulls/new.json`; + const { pullOwner, pullBranch, mergeOwner, mergeBranch, projectId , pullIdentity } = branchParams; + const url = `/${pullOwner}/${pullIdentity || projectId}/pulls/new.json`; axios.get(url).then((result) => { if (result) { if(init){ @@ -283,7 +290,7 @@ class CreateMerge extends Component { // 切换仓库响应事件,目前仅目标分支可切换仓库 selectProjectName = (value, isChangeProject, initPro) => { const { projects_names, id } = isChangeProject ? this.state : initPro; - const { pullOwner, pullBranch } = getBranchParams( + const { pullOwner, pullBranch , pullIdentity , projectId } = getBranchParams( this.props.location.pathname ); let arr = @@ -315,7 +322,7 @@ class CreateMerge extends Component { ); } else { this.props.history.push( - `/${login}/${identifier}/compare/${branch}...${pullOwner}:${turnbar(pullBranch)}` + `/${login}/${identifier}/compare/${branch}...${pullOwner}/${pullIdentity || projectId}:${turnbar(pullBranch)}` ); } } diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js index 8773e110..237a0733 100644 --- a/src/forge/Merge/merge.js +++ b/src/forge/Merge/merge.js @@ -233,7 +233,7 @@ class merge extends Component { const { projectsId,owner } = this.props.match.params; let branch = turnbar(defaultBranch) || "master"; if (projectDetail && projectDetail.fork_info) { - this.props.history.push(`/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}/compare/${branch}...${owner + ':' + branch}`) + this.props.history.push(`/${projectDetail.fork_info.fork_project_user_login}/${projectDetail.fork_info.fork_project_identifier}/compare/${branch}...${owner + '/' + projectsId +':' + branch}`) } else { this.props.history.push(`/${owner}/${projectsId}/compare/${branch}...${branch}`); }