diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index f221492f6..000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,1190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1584692398144 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 69d6155f2..628e5a3b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4885,7 +4885,7 @@ }, "dom-closest": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-closest/-/dom-closest-0.2.0.tgz", + "resolved": "https://registry.npm.taobao.org/dom-closest/download/dom-closest-0.2.0.tgz", "integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=", "requires": { "dom-matches": ">=1.0.1" @@ -4929,7 +4929,7 @@ }, "dom-matches": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-matches/-/dom-matches-2.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/dom-matches/download/dom-matches-2.0.0.tgz", "integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw=" }, "dom-scroll-into-view": { @@ -5187,7 +5187,7 @@ }, "enquire.js": { "version": "2.1.6", - "resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz", + "resolved": "https://registry.npm.taobao.org/enquire.js/download/enquire.js-2.1.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenquire.js%2Fdownload%2Fenquire.js-2.1.6.tgz", "integrity": "sha1-PoeAybi4NQhMP2DhZtvDwqPImBQ=" }, "entities": { @@ -5706,7 +5706,7 @@ }, "eventlistener": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/eventlistener/-/eventlistener-0.0.1.tgz", + "resolved": "https://registry.npm.taobao.org/eventlistener/download/eventlistener-0.0.1.tgz", "integrity": "sha1-7Suqu4UiJ68rz4iRUscsY8pTLrg=" }, "events": { @@ -8040,7 +8040,7 @@ }, "hammerjs": { "version": "2.0.8", - "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "resolved": "https://registry.npm.taobao.org/hammerjs/download/hammerjs-2.0.8.tgz", "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" }, "handle-thing": { @@ -8881,7 +8881,7 @@ }, "immutable": { "version": "3.7.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", + "resolved": "https://registry.npm.taobao.org/immutable/download/immutable-3.7.6.tgz", "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=" }, "import-fresh": { @@ -10486,7 +10486,7 @@ }, "lodash.throttle": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "resolved": "https://registry.npm.taobao.org/lodash.throttle/download/lodash.throttle-4.1.1.tgz", "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" }, "lodash.uniq": { diff --git a/package.json b/package.json index b58b501df..a78351cba 100644 --- a/package.json +++ b/package.json @@ -193,6 +193,7 @@ "babel-core": "^6.26.0", "babel-plugin-import": "^1.13.0", "babel-plugin-transform-runtime": "^6.23.0", + "babel-polyfill": "^6.26.0", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babel-preset-stage-2": "^6.24.1", diff --git a/public/css/edu-common.css b/public/css/edu-common.css index 96a8277df..56790f055 100755 --- a/public/css/edu-common.css +++ b/public/css/edu-common.css @@ -114,14 +114,6 @@ a:visited { color: #898989; } -a:hover { - color: #FF7500; -} - -a:hover.fa { - color: #FF7500; -} - input, textarea, select { diff --git a/public/css/edu-main.css b/public/css/edu-main.css index 3cbe5fcbb..1d9959033 100644 --- a/public/css/edu-main.css +++ b/public/css/edu-main.css @@ -97,10 +97,6 @@ a:visited { color: #05101a; } -a:hover { - color: #459be5; -} - ol, ul, li { diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index f721824be..ecce221de 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1,3 +1,4 @@ +@charset "utf-8"; /* 头部 */ .header { width: 100%; @@ -1271,7 +1272,7 @@ html body { font-size: 14px; line-height: 2.0; background: #fafafa; - font-family: "微软雅黑", "宋体"; + font-family: "Microsoft YaHei", "SimSun"; color: #05101a; height: 100%; position: relative; @@ -1307,6 +1308,7 @@ td, span { margin: 0; padding: 0; + margin-bottom: 0px!important; } table, @@ -1363,10 +1365,6 @@ a:visited { color: #05101a; } -a:hover { - color: #459be5; -} - ol, ul, li { @@ -1473,7 +1471,7 @@ a.edu-txt-w80, /*隐藏*/ .none { - display: none + display: none!important; } .block { @@ -2436,7 +2434,11 @@ a.hoverLine:hover{ .color-grey-9 { - color: #999999 !important; + color: #333333 !important; +} + +a:hover{ + color: #466AFF !important; } .color-grey-98 { @@ -2458,7 +2460,7 @@ a.hoverLine:hover{ .color-grey-B3 { color: #B3B3B3 !important; } - +` .color-grey-B4 { color: #B4B4B4 !important; } @@ -2471,33 +2473,23 @@ a.hoverLine:hover{ a.color-grey-name:hover, a.color-dark:hover, a.color-grey-6:hover, -a.color-grey-3:hover { - color: #4cacff !important; -} - -a.color-grey-9:hover, -a.color-grey-8:hover, -a.color-grey-c:hover { - color: #111C24 !important; +a.color-grey-3:hover,a.color-ooo:hover { + color: #2A61FF !important; } /*蓝色*/ .color-blue { - color: #4CACFF !important; + color: #2A61FF !important; +} +.color-blue-file { + color: #4598FA!important; } /* 绿色 */ -.color-green-file{ - color: #28BD6C; -} /*主*/ .color-blue_4C { color: #4CACFF !important; } -a.color-blue:hover, -a.color-blue_4C:hover { - color: #459BE6 !important; -} /*橙色*/ .color-orange { diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 2aaace214..e50f44e1a 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(c){var l,a,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file +!function(c){var l,a,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); diff --git a/src/college/colleagecss/colleage.css b/src/college/colleagecss/colleage.css index 9220b8acc..65f32322a 100644 --- a/src/college/colleagecss/colleage.css +++ b/src/college/colleagecss/colleage.css @@ -218,7 +218,7 @@ a:hover { } .color-blue { - color: #4CACFF; + color: #2A61FF; } .color-huang { diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 07e141ebf..f1800a75d 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -18,6 +18,23 @@ export function getImageUrl(path) { return `${path}`; } +export function numFormat(num, digits){ + let d = digits || 1; + var si = [ + { value: 1, symbol: "" }, + { value: 1E3, symbol: "k" }, + { value: 1E4, symbol: "W" } + ]; + var rx = /\.0+$|(\.[0-9]*[1-9])0+$/; + var i; + for (i = si.length - 1; i > 0; i--) { + if (num >= si[i].value) { + break; + } + } + return (num / si[i].value).toFixed(d).replace(rx, "$1") + si[i].symbol; +} + export function getImage(path) { // https://www.educoder.net // https://testbdweb.trustie.net diff --git a/src/common/educoder.js b/src/common/educoder.js index c6eaf176d..1a063d823 100644 --- a/src/common/educoder.js +++ b/src/common/educoder.js @@ -3,7 +3,7 @@ // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; export { - getUploadLogoActionUrl as getUploadLogoActionUrl, + getUploadLogoActionUrl as getUploadLogoActionUrl,numFormat as numFormat, getImageUrl as getImageUrl,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl , getUploadActionUrl as getUploadActionUrl, getUploadActionUrltwo as getUploadActionUrltwo, getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth , getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl diff --git a/src/forge/Branch/CloneAddress.js b/src/forge/Branch/CloneAddress.js index e936bb705..c2e6dd746 100644 --- a/src/forge/Branch/CloneAddress.js +++ b/src/forge/Branch/CloneAddress.js @@ -7,7 +7,7 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) { const [ key , setKey ] = useState("HTTP"); return (
-
+
{setKey(e.key)}}>HTTP {setKey(e.key)}}>SSH diff --git a/src/forge/Branch/Select.jsx b/src/forge/Branch/Select.jsx index fedd288c1..073658d93 100644 --- a/src/forge/Branch/Select.jsx +++ b/src/forge/Branch/Select.jsx @@ -1,116 +1,36 @@ import React , { useState , useEffect } from 'react'; -import { Popover , Input , Spin } from 'antd'; +import { Popover , Dropdown , Input , Spin } from 'antd'; import './branch.scss'; import { getBranch , getTag } from '../GetData/getData'; +import SelectOverlay from './SelectOverlay'; export default (({ projectsId , branch , owner , changeBranch , branchList , tagflag = true })=>{ const [ showValue , setShowValue ] = useState(branch); - const [ inputValue , setInputValue] = useState(undefined); - const [ nav , setNav ] = useState(0); - const [ isSpin , setIsSpin ] = useState(true); - const [ flag , setFlag ] = useState(false); - - const [ data , setData ] = useState(undefined); - const [ datas , setDatas ] = useState(undefined); useEffect(()=>{ setShowValue(branch); },[branch]) - useEffect(()=>{ - document.body.addEventListener('click', e => { - let name = e.target.className; - let turn = name === "ant-input OptionsInput" || name === "navli active"|| name === "navli" || name === "padding10 bor-bottom-greyE"; - if(turn){ - return; - }else{ - setFlag(false); - } - }) - }) - - useEffect(()=>{ - if(branchList){ - setData(branchList); - setDatas(branchList); - setIsSpin(false); - } - },[branchList]) - - - async function getBranchs(id,owner){ - let result = await getBranch(id,owner); - setData(result); - setDatas(result); - setIsSpin(false); - } - async function getTags(id,owner){ - let result = await getTag(id,owner); - setData(result); - setDatas(result); - setIsSpin(false); - } - - function changeInputValue(e){ - setInputValue(e.target.value); - let filter = e.target.value ? data && data.length>0 && data.filter(item=>item.name.indexOf(e.target.value)>-1) : data; - setDatas(filter); - } - - function changeNav(nav){ - setNav(nav); - setIsSpin(true); - if(nav === 0){ - getBranchs(projectsId,owner); - }else{ - getTags(projectsId,owner); - } - } - function chooseitem(value){ - // setShowValue(value); - changeBranch(value); - } - - const menu = ( -
-
- -
    -
  • changeNav(0)}>分支列表
  • - { tagflag &&
  • changeNav(1)}>标签列表
  • } -
-
- -
    - { - datas && datas.length>0 ? - datas.map((item,key)=>{ - return( -
  • chooseitem(item.name)}>{item.name}
  • - ) - }): -

    暂无{inputValue}{nav === 0 ?"分支":"标签"}~

    - } -
-
-
+ ); return( - setFlag(!flag)} overlayClassName="branch-tagBox-list"> +
{/* {nav === 0 ?"分支":"标签"} */} - + {showValue} - - + +
-
+ ) }) \ No newline at end of file diff --git a/src/forge/Branch/SelectOverlay.jsx b/src/forge/Branch/SelectOverlay.jsx new file mode 100644 index 000000000..d536d1c99 --- /dev/null +++ b/src/forge/Branch/SelectOverlay.jsx @@ -0,0 +1,84 @@ +import React , { useState , useEffect } from 'react'; +import { Input , Spin , Menu } from 'antd'; +import { getBranch , getTag } from '../GetData/getData'; + +function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owner }) { + const [ inputValue , setInputValue] = useState(undefined); + const [ nav , setNav ] = useState(0); + const [ isSpin , setIsSpin ] = useState(true); + + const [ data , setData ] = useState(undefined); + const [ datas , setDatas ] = useState(undefined); + const [ keys ,setKeys] = useState("branch"); + + useEffect(()=>{ + if(branchList){ + setData(branchList); + setDatas(branchList); + setIsSpin(false); + } + },[branchList]) + + async function getBranchs(id,owner){ + let result = await getBranch(id,owner); + setData(result); + setDatas(result); + setIsSpin(false); + } + async function getTags(id,owner){ + let result = await getTag(id,owner); + setData(result); + setDatas(result); + setIsSpin(false); + } + function chooseitem(value){ + changeBranch(value); + } + function changeInputValue(e){ + setInputValue(e.target.value); + let filter = e.target.value ? data && data.length>0 && data.filter(item=>item.name.indexOf(e.target.value)>-1) : data; + setDatas(filter); + } + + function changeNav(e){ + setKeys(e.key); + setIsSpin(true); + if(e.key === "branch"){ + getBranchs(projectsId,owner); + }else{ + getTags(projectsId,owner); + } + } + + return( +
+
+ } + placeholder="请输入分支或标签名称搜索" + autocomplete="off" className="OptionsInput" + value={inputValue} + onChange={changeInputValue} + /> +
+ + 分支 + { tagflag && 标签 } + + +
    + { + datas && datas.length>0 ? + datas.map((item,key)=>{ + return( +
  • chooseitem(item.name)}>{item.name}
  • + ) + }): +

    暂无{inputValue}{nav === 0 ?"分支":"标签"}~

    + } +
+
+
+ ) +} +export default SelectOverlay; \ No newline at end of file diff --git a/src/forge/Branch/branch.scss b/src/forge/Branch/branch.scss index 0c7e136a8..b0f8ca2c9 100644 --- a/src/forge/Branch/branch.scss +++ b/src/forge/Branch/branch.scss @@ -27,10 +27,11 @@ overflow-y: auto; } .OptionsUl li{ - height: 35px; - line-height: 35px; + height: 30px; + line-height: 30px; cursor: pointer; - padding:0px 10px; + padding:0px 20px; + margin:5px 0px; } .OptionsUl li:hover{ background-color: #F0F0F0; @@ -45,38 +46,49 @@ width: 100%; } .branch-tagBox{ - border:1px solid #eee; + border:1px solid #D0D0D0; border-radius: 3px; - height: 40px; + height: 32px; display: flex; align-items: center; cursor: pointer; - min-width: 140px; + min-width: 104px; } -.branch-tagBox-list .ant-popover-arrow{ - display: none; +.branch-tagBox:hover{ + background-color: #F3F4F6; } -.branch-tagBox-list.ant-popover.ant-popover-placement-bottom{ - padding-top:0px; +.branch-tagBox-list{ + background: #FFFFFF; + box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5); + border-radius: 4px; + .ant-popover-arrow{ + display: none; + } + &.ant-popover.ant-popover-placement-bottom{ + padding-top:0px; + } + .branch-tagBox .ant-dropdown-link{ + display: block; + flex:1; + max-width: 105px; + } + .ant-popover-inner-content{ + padding:0px; + } } -.branch-tagBox .ant-dropdown-link{ - display: block; - flex:1; -} -.branch-tagBox-list .ant-popover-inner-content{ - padding:0px; -} -.navUl{ - display: flex; - justify-content: space-between; - align-items: center; - margin-top: 5px; -} -.navUl li{ - cursor: pointer; -} -.navUl li.active{ - color:#5091FF; +.overlayBranch{ + width: 325px; + .navUl{ + margin-top: 8px; + height: 30px; + line-height: 30px; + li{ + height: 30px; + line-height: 30px; + padding:0px 5px; + margin-left: 20px!important; + } + } } .listTips{ padding:20px 0px; @@ -86,6 +98,7 @@ .urlMenu{ line-height: 30px; margin-bottom: 10px; + padding:15px 20px 0px 20px; border-bottom: none; li.ant-menu-item{ height: 30px; diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index 3a94c3751..30a62005c 100644 --- a/src/forge/Component/Component.scss +++ b/src/forge/Component/Component.scss @@ -113,7 +113,14 @@ li.ant-menu-item{ z-index: 10000; } .laterest{ - color: #05690d; + background-color: #EF3131; + color: #fff; + font-size: 12px; + margin-left: 10px; + padding:0px 5px; + border-radius: 2px; + height: 18px; + line-height: 18px; } @media screen and (max-width: 1800px){ @@ -155,41 +162,112 @@ li.ant-menu-item{ margin:0px 20px!important; } } - +.hoverA{ + display:flex; + align-items: center; + max-width: 78px; + &:hover a{ + color:#2A61FF !important ; + } +} .menuPanels{ - width: 240px; - height: 180px; + width: 295px; + .leftline{ + position: relative; + color: #666; + height: 16px; + margin-left: 14px; + font-size: 12px; + &::before{ + position: absolute; + left: -7px; + top:3px; + height: 12px; + width: 1px; + background-color: #999; + content: ""; + } + } + .ant-btn{ + height: 36px; + line-height: 34px; + width: 83px; + text-align: center; + padding:0px ; + font-weight: 500; + font-size: 14px; + &.currentBtn{ + cursor: default; + color: #333; + &:hover{ + color: #333; + border-color: #d0d0d0; + } + } + } + .ant-btn-default{ + color: #333; + border-color: #d0d0d0; + &:hover{ + background: #F3F4F6; + } + } + .ant-btn{ + width: 102px; + height: 32px; + line-height: 30px; + } + .ant-btn-primary{ + color: #fff; + background-color: #466AFF; + border:none; + &:hover{ + background-color: rgba(70,106,255,0.85); + } + } + .focusPanelHeadInfo{ + padding:14px 16px; + border-bottom: 1px solid #eee; + } .ant-popover-content,.ant-popover-inner{ height: 100%; width: 100%; } + .ant-popover-inner-content{ + padding:0px; + } } .halfs{ margin-top: 24px; padding:24px 0px 0px 0px; border-top: 1px solid #e8e8e8; - .attrPerson{ - padding-bottom: 24px; - } +} +.aboutSubTitle{ + display: flex; + align-items: center; +} +.menuMaininfos{ + padding:10px 16px 14px; + border-bottom: 1px solid #eee; } .menuinfos{ - padding:15px 0px; + padding:10px 20px 16px; &>a{ display: flex; flex-direction: column; align-items: center; - border-right: 1px solid #eee; flex: 1; & >span:first-child{ - font-size: 18px; - font-weight: 400; + font-size: 16px; + font-weight: 500; color: #333; + line-height: 22px; } & >span:last-child{ color: #666; - } - &:last-child{ - border-right: none; + font-weight: 400; + line-height: 20px; + margin-top: 6px; } } } diff --git a/src/forge/Component/Contributors.jsx b/src/forge/Component/Contributors.jsx index 2f67b3ab5..e88acc056 100644 --- a/src/forge/Component/Contributors.jsx +++ b/src/forge/Component/Contributors.jsx @@ -1,13 +1,13 @@ import React, { useEffect, useState } from 'react'; import { AlignCenter , FlexAJ } from '../Component/layout'; import { Link } from 'react-router-dom'; -import { Popover , Spin } from 'antd'; +import { Popover , Spin , Button } from 'antd'; import { getImageUrl } from 'educoder'; import './Component.scss'; import { getUser } from '../GetData/getData'; import axios from 'axios'; -function Contributors({contributors,owner,projectsId}){ +function Contributors({contributors,owner,projectsId,currentLogin}){ const [ menuList ,setMenuList ]= useState([]); const [ list , setList ]= useState(undefined); const [ total , setTotal ]= useState(0); @@ -46,46 +46,60 @@ function Contributors({contributors,owner,projectsId}){ } } + function renderOrganize(list) { + let str = ""; + list.map(i=>{ + str = str+i.name + "、"; + }) + return str && str.substr(0,str.length - 1); + } + function setMenusFunc(data){ if(data){ let ele = ( - + - {data.name} - - { - data.is_watch ? FocusFunc(false,data.login)}>取消关注:FocusFunc(true,data.login)}>关注 - } - - - - {data.projects_count} - 项目数 - - - {data.followers_count} - 粉丝数 - - - {data.following_count} - 关注数 - - - { - data.organizations && data.organizations.length > 0 ? - - 所属组织: -
- {renderArray(data.organizations)} + +
+ {data.name} + { data.location && {data.location} } + { + data.organizations && data.organizations.length>0&& +

+ 所属组织:{renderOrganize(data.organizations)} +

+ }
- :"" - } - { - data.location && 所在地址:{data.location} - } + + + + {data.projects_count} + 项目数 + + + {data.followers_count} + 粉丝数 + + + {data.following_count} + 关注数 + + +
+ { + currentLogin && (currentLogin === data.login) + ? + + : + data.is_watch ? + + : + + } +
) setMenu(ele); @@ -135,10 +149,10 @@ function Contributors({contributors,owner,projectsId}){ return(
- - 贡献者{ contributors && contributors.total_count > 0 && {contributors.total_count}} - 全部 - + + 贡献者 + { contributors && contributors.total_count > 0 && {contributors.total_count}} +
setVisibleFunc(false)}> { total > 0 ? diff --git a/src/forge/Component/CopyTool.jsx b/src/forge/Component/CopyTool.jsx index 86fb32dab..36ed1d8c1 100644 --- a/src/forge/Component/CopyTool.jsx +++ b/src/forge/Component/CopyTool.jsx @@ -2,7 +2,7 @@ import React, { useState, useCallback, memo } from 'react'; import { Tooltip } from 'antd'; CopyTool.defaultProps = { - beforeText: '复制', //浮动过去显示的文字 + beforeText: '复制链接', //浮动过去显示的文字 afterText: '复制成功', //点击后显示的文字 className: '', //传给svg的class inputId: 'copyText', //要复制的文本的ID @@ -26,6 +26,7 @@ function CopyTool({ beforeText, afterText, className , inputId , timeOut }) { if (document.execCommand('copy')) { document.execCommand('copy'); } + document.getSelection().removeAllRanges(); setTitle(afterText); if(timeOut){ diff --git a/src/forge/Component/LanguagePower.jsx b/src/forge/Component/LanguagePower.jsx index 3197309c4..8d3e361b5 100644 --- a/src/forge/Component/LanguagePower.jsx +++ b/src/forge/Component/LanguagePower.jsx @@ -25,7 +25,7 @@ function LanguagePower({languages}){ } return(
-

开发语言

+

开发语言

{ array && array.map((item,key)=>{ diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx index bf8caebd4..6d4d0acf4 100644 --- a/src/forge/Component/Releases.jsx +++ b/src/forge/Component/Releases.jsx @@ -1,38 +1,34 @@ import React from 'react'; -import { AlignCenter , AlignTop , FlexAJ } from '../Component/layout'; +import { AlignTop } from '../Component/layout'; import { Link } from 'react-router-dom'; function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}){ return(
- - 发行版 - { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}} - - { (releaseVersions && releaseVersions.total_count > 0) || projectType ===2 ? - 全部 - : - baseOperate && 新建 - } - + + 发行版 + { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}} + { releaseVersions && releaseVersions.total_count>0 ? releaseVersions.list.map((item,key)=>{ return( key === 0 && -

{item.name} 最新

-

{item.created_at}

+

{item.created_at}

) }) - :"" + : +
+ 您暂未发布任何版本{baseOperate && projectType !==2 && 创建新版本} +
}
diff --git a/src/forge/Component/Sort.jsx b/src/forge/Component/Sort.jsx index 58f8a5d2f..a15f04da9 100644 --- a/src/forge/Component/Sort.jsx +++ b/src/forge/Component/Sort.jsx @@ -2,9 +2,9 @@ import React from 'react'; import {Popover} from 'antd'; import './Component.scss'; -export default (({menu , children})=>{ +export default (({menu , children, overlayClassName})=>{ return( - + {children} ) diff --git a/src/forge/Divert/DivertModal.jsx b/src/forge/Divert/DivertModal.jsx index acf881175..d4c1f2014 100644 --- a/src/forge/Divert/DivertModal.jsx +++ b/src/forge/Divert/DivertModal.jsx @@ -46,14 +46,11 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){ Axios.post(url,{ ...values }).then(result=>{ - if(result){ - if(result.data.status === 0){ - onSuccess(result.data && result.data.owner); - }else{ - onSuccess(); - } + if(result && result.data.id){ + onSuccess(result.data && result.data.owner); + }else{ + onSuccess(); } - }).catch(error=>{}) } }) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index e2dbc49d1..be568ca9f 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -1,8 +1,9 @@ import React , { useEffect , useState } from 'react'; import { WhiteBack , Box , LongWidth , ShortWidth , Gap , AlignCenter , FlexAJ } from '../Component/layout'; -import { Dropdown , Menu , Divider , Spin, Button } from 'antd'; +import { Dropdown , Menu , Divider , Spin, Button , Typography } from 'antd'; import { getImageUrl } from "educoder"; import { Link } from 'react-router-dom'; +import { truncateCommitId } from "../common/util"; import CloneAddress from '../Branch/CloneAddress'; import SelectBranch from '../Branch/Select'; @@ -24,7 +25,7 @@ import CheckProfile from '../Component/ProfileModal/Profile'; /** * projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能) */ - + const { Paragraph } = Typography; function turnbar(str){ if(str && str.length>0 && str.indexOf("/")>-1){ return str.replaceAll('/','%2F'); @@ -148,7 +149,6 @@ function CoderDepot(props){ setReadme(result.data.readme); setEditReadme(false); setHide(true); - console.log("dddd:",result.data.entries); } setTimeout(function(){setIsSpin(false);},500); }).catch(error=>{setIsSpin(false);}) @@ -209,7 +209,7 @@ function CoderDepot(props){ let b = branchName || defaultBranch; let checkvalue = turnbar(b); return ( - + urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件 @@ -303,6 +303,7 @@ function CoderDepot(props){ const { current_user } = props; const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter"; const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin)); + return( setOpenModal(false)} onOk={okUpdate}/> @@ -321,7 +322,7 @@ function CoderDepot(props){ list = {mainFlag ? dirInfo : undefined} />
setVisible(true)}> - + 目录
@@ -334,7 +335,7 @@ function CoderDepot(props){
-
+
{ props && props.platform ? - - - {projectDetail && projectDetail.branches && projectDetail.branches.total_count}个分支 + + + 分支 + {projectDetail && projectDetail.branches && projectDetail.branches.total_count} - - - {projectDetail && projectDetail.tags && projectDetail.tags.total_count}个标签 + + + 标签 + {projectDetail && projectDetail.tags && projectDetail.tags.total_count} - + { baseOperate && ((projectDetail.type !== 2 && pullsFlag) || issuesFlag )&& -
+
{ projectDetail.type !== 2 && pullsFlag && urlLink(`/${owner}/${projectsId}/pulls/new`)} >+ 合并请求 } { issuesFlag && - urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 任务 + urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 易修 }
} { fileOperate && - - + + 文件 } - + @@ -395,15 +403,18 @@ function CoderDepot(props){ lastCommit &&
-
-
{lastCommit && lastCommit.message}
+
props.history.push(`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`)} className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}> +
{lastCommit.message}
{ hideBtn && changeHide(hide)}> } - {lastCommit && lastCommit.time_from_now} - { commitCount ? - {commitCount}次提交 - :"" } + {lastCommit.time_from_now} + { + commitCount ? + + {commitCount}次提交 + :"" + }
}
    @@ -458,48 +469,48 @@ function CoderDepot(props){
    - 简介 + 关于 { projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner" || projectDetail.permission==="Manager") && - setOpenModal(true)} className="iconfont icon-anquanshezhi color-grey-9 font-15"> + setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15"> } - {desc &&

    {desc}

    } + {desc &&

    {desc}

    } { website && -

    - - {website} -

    +
    + + {website} +
    } -

    - - README.md -

    -

    - +

    + + README.md +
    +
    + {projectDetail && projectDetail.size} -

    +
    { projectDetail && projectDetail.license_name && -

    - - {projectDetail.license_name} -

    +
    + + {projectDetail.license_name} +
    }
    { inviteCode &&
    - +
    } { lesson_url &&
    -

    实践课程

    +

    实践课程

    {lesson_url}
    } @@ -520,11 +531,11 @@ function CoderDepot(props){ } {/* 贡献者 */} { - projectDetail && projectDetail.contributors && projectDetail.contributors.length >0 && - + projectDetail && projectDetail.contributors && projectDetail.contributors.total_count >0 && + } {/* 语言 */} - { projectDetail && projectDetail.languages && projectDetail.languages.length >0 && + { projectDetail && projectDetail.languages && diff --git a/src/forge/Main/CoderDepotCatalogue.jsx b/src/forge/Main/CoderDepotCatalogue.jsx index 3aa5ccc82..4f5d86c1a 100644 --- a/src/forge/Main/CoderDepotCatalogue.jsx +++ b/src/forge/Main/CoderDepotCatalogue.jsx @@ -4,8 +4,8 @@ import { truncateCommitId } from '../common/util'; const typeIco = { "submodule":"icon-file-submodule font-17", - "file":'icon-wenjia font-15', - "dir":"icon-wenjianjia1 font-15" + "file":'icon-wenjian6 font-15 color-blue-file', + "dir":"icon-wenjianjia4 font-15 color-blue_4C" } function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){ @@ -13,7 +13,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
  • goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}> - {item.name} + {item.name} @@ -21,7 +21,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){ {item.commit && item.commit.message} - {item.commit && item.commit.time_from_now} + {item.commit && item.commit.time_from_now}
  • ) } diff --git a/src/forge/Main/CoderDepotReadme.jsx b/src/forge/Main/CoderDepotReadme.jsx index 1c54663d4..315f70805 100644 --- a/src/forge/Main/CoderDepotReadme.jsx +++ b/src/forge/Main/CoderDepotReadme.jsx @@ -1,8 +1,9 @@ import React, { useEffect, useState } from 'react'; import RenderHtml from '../../components/render-html'; import { AlignCenter } from '../Component/layout'; -import { Dropdown , Menu , Spin } from 'antd'; -import { Link } from 'react-router-dom'; +import { Dropdown , Anchor , Spin } from 'antd'; + +import ReadmeCatelogue from './sub/ReadmeCatelogue'; const $ = window.$; function CoderDepotReadme({ operate , history , readme , ChangeFile }){ @@ -23,49 +24,45 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){ const anchor = el.id; const level = el.tagName.replace("H", ""); const href = `#${anchor}`; - return { href:`${path}${href}`,text:el.textContent , level:level } + return { href:`${href}`,text:el.textContent , level:level } }); setMenuList(items); },[content]) function menu(){ if(menuList && menuList.length > 0){ - let hash = history.location.hash; return( - - { - menuList.map((item,key)=>{ - return( - -1 ?"active":""}>{item.text} - ) - }) - } - + ) }else{ return } } + return( -
    -
    - - - - - 目录 - - - README.md - - { - operate ? - ChangeFile(readme && readme.path, false)}> - - - :"" - } -
    +
    + +
    + + + + + 目录 + + + + README.md + + + { + operate ? + ChangeFile(readme && readme.path, false)}> + + + :"" + } +
    +
    { content &&
    diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js index 3f71d6920..4982414a2 100644 --- a/src/forge/Main/CoderRootBranch.js +++ b/src/forge/Main/CoderRootBranch.js @@ -4,7 +4,7 @@ import { Dropdown , Menu , Icon , Tooltip , Spin } from 'antd'; import { truncateCommitId } from '../common/util'; import { getBranch } from '../GetData/getData'; import Nodata from '../Nodata'; -import './list.css'; +import './list.scss'; function turnbar(str){ if(str && str.length>0 && str.indexOf("/")>-1){ diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index fb17098bc..d5a9670c6 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import { Popconfirm , Select } from "antd"; -import "./list.css"; +import "./list.scss"; import axios from "axios"; import Meditor from "../Newfile/m_editor"; import RenderHtml from "../../components/render-html"; diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 803b4c74b..560420a66 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -1,10 +1,13 @@ import React, { Component } from 'react'; -import { Spin, Tooltip, Button } from 'antd'; +import { Spin, Tooltip } from 'antd'; import { Link, Route, Switch } from 'react-router-dom'; import { Content, AlignTop } from '../Component/layout'; import DetailBanner from './sub/DetailBanner'; import '../css/index.scss' -import './list.css'; +import './list.scss'; + +import { ImageLayerOfCommentHOC } from "../../modules/page/layers/ImageLayerOfCommentHOC"; + import Loadable from 'react-loadable'; import Loading from '../../Loading'; @@ -142,7 +145,7 @@ const WikiEdit = Loadable({ function checkPathname(projectsId, owner, pathname) { let name = ""; if (pathname && pathname !== `/${owner}/${projectsId}`) { - let url = pathname.split(`/${owner}/${projectsId}`)[1] || ''; + let url = pathname.split(`/${owner}/${projectsId}`)[1] || ""; if (url.indexOf("/about") > -1) { name = "about" } else if (url.indexOf("/issues") > -1 || url.indexOf("Milepost") > 0) { @@ -471,7 +474,7 @@ class Detail extends Component {
    - +
    @@ -491,7 +494,7 @@ class Detail extends Component { } { projectDetail && projectDetail.type && projectDetail.type !== 0 ? - 镜像自 {projectDetail.mirror_url} + 导入于 {projectDetail.mirror_url} : "" }
    @@ -504,7 +507,7 @@ class Detail extends Component { ((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ? 同步镜像 : "" } - - - + }
    @@ -780,4 +783,7 @@ class Detail extends Component { } } -export default Detail; +export default ImageLayerOfCommentHOC({ + imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", + parentSelector: ".newContainer", +})(Detail); diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index a08c3d3bc..3b1f66dba 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -5,7 +5,7 @@ import { getImageUrl } from 'educoder'; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; import '../css/index.scss' -import './list.css'; +import './list.scss'; import './Index.scss'; import ListItem from './IndexItem' import axios from 'axios'; @@ -255,14 +255,14 @@ class Index extends Component { newItem = ()=>{ return( - - - {this.props.history.push('/projects/mirror/new')}}>新建镜像项目 - - - {this.props.history.push('/projects/deposit/new')}}>新建托管项目 - - +
      +
    • + {this.props.history.push('/projects/deposit/new')}}>新建项目 +
    • +
    • + {this.props.history.push('/projects/mirror/new')}}>导入项目 +
    • +
    ) } @@ -392,7 +392,13 @@ class Index extends Component {
    { current_user && current_user.login && - + 新建 diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index cb05f1cf2..1158c38e6 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -13,6 +13,21 @@ } } } +.iconBtn{ + i{ + color: #666; + } + span{ + margin-left: 4px; + color: #333!important; + &:last-child{ + font-weight: 500; + } + } + &:hover span,&:hover i{ + color: #466AFF!important; + } +} /* recommandProjects */ .recommandProjects.slick-slider{ width: 1230px; @@ -108,46 +123,77 @@ margin: 0 auto; .panelmenu{ padding-top:30px; + .depotBtn{ + .mr-5{ + margin-right: -5px; + } + .ant-btn{ + height: 32px; + line-height: 32px; + width: 83px; + text-align: center; + padding:0px ; + font-weight: 500; + font-size: 14px; + } + .ant-btn-default{ + color: #333; + border-color: #d0d0d0; + &:hover{ + background: #F3F4F6; + } + } + .ant-btn-primary{ + color: #fff; + background-color: #466AFF; + border: none; + &:hover{ + background-color: rgba(70,106,255,0.85); + } + } + } } - .addOptionBtn{ - height: 32px; - line-height: 30px; + .depotBtn,.addOptionBtn{ display: flex; - border:1px solid #d9d9d9; - border-radius: 2px; a{ - padding:0px 13px; - color: rgba(0, 0, 0, 0.65); - cursor: pointer; - } - & > a:first-child{ - border-right: 1px solid #d9d9d9; - } - & > a:last-child{ - border-right: none; + color: #333!important; + font-weight: 500!important; + border-radius: 5px; + width: 83px; + height: 32px; + line-height: 30px; + background: #fff; + border: 1px solid #D0D0D0; + margin-right: 10px; + text-align: center; + &:hover,&:active{ + background: #F3F4F6; + } } } .infoCount{ display: inline-block; - padding:0px 5px; - height: 16px; - line-height: 16px; - background-color: #eee; - color:#999; + width: 24px; + text-align: center; + height: 24px; + line-height: 24px; + background-color:rgba(153, 153, 153, 0.13);; + color:#666; border-radius: 12px; - margin-left: 10px; + margin-left: 6px; font-size: 12px; } .attrPerson{ - padding-top: 15px; + padding-top: 12px; display: flex; flex-wrap: wrap; + padding-bottom: 2px; a{ - margin: 10px 10px 0px 0px; + margin: 0px 17px 0px 0px; img{ border-radius: 50%; - width: 35px; - height: 35px; + width: 40px; + height: 40px; } &:nth-child(6){ margin-right: 0px; @@ -156,15 +202,15 @@ } .progress{ display: flex; - border-radius: 10px; - height: 7px; + border-radius: 2px; + height: 11px; margin-top: 12px; span{ &:first-child{ - border-radius: 10px 0px 0px 10px; + border-radius: 2px 0px 0px 2px; } &:last-child{ - border-radius: 0px 10px 10px 0px; + border-radius: 0px 2px 2px 0px; } } } @@ -184,10 +230,11 @@ padding-left: 15px; position: relative; min-width: 33.5%; + font-size: 12px; + font-weight: 400; + color: #666; span{ - color: #666; &:last-child{ - color: #999; margin-left: 5px; } } @@ -195,18 +242,18 @@ } .listtable{ margin-top: 20px; - border:1px solid #d9d9d9; - border-radius: 4px; .listtablehead{ display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #d9d9d9; - padding:7px 20px; + padding:12px 20px 11px; border-radius: 4px 4px 0px 0px; - background-color: #FAFBFC; + border: 1px solid rgba(42, 97, 255, 0.23); + background-color: #FAFCFF; .ellipsistxt{ margin-top: 6px; + cursor: pointer; #ptxt{ margin-bottom: 0px; word-break: break-all; @@ -227,32 +274,37 @@ overflow: hidden; position: relative; padding-right:8px; - &::after{ - position: absolute; - right: 0px; - bottom: 0px; - content:"..."; - } + // &::after{ + // position: absolute; + // right: 0px; + // bottom: 0px; + // content:"..."; + // } } } .ellipsis{ margin-left: 8px; cursor: pointer; border-radius: 2px; - background-color: #c1c1c1; + height: 16px; + background: rgba(153, 153, 153, 0.2); + border-radius: 2px; padding:0px 4px; height: 14px; line-height: 14px; margin-top: 9px; i{ font-size: 15px!important; - color: #fff; + color: #333; height: 14px; line-height: 14px; } } } .listtablebody{ + border-radius:0px 0px 4px 4px ; + border: 1px solid #D0D0D0; + border-top: none; li.listtablepath{ a{color: #40a9ff;} p{ @@ -260,12 +312,15 @@ } } & > li{ - height: 42px; + height: 38px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #d9d9d9; padding:0px 20px 0px 24px; + &:hover{ + background-color: #F3F4F6; + } & > span:first-child{ width: 30%; overflow: hidden; @@ -292,8 +347,10 @@ .drawerBtn{ position: fixed; left: -13px; - border:1px solid rgb(207,205,223); - width: 34px; + width: 33px; + background: #FFFFFF; + box-shadow: 0px 0px 8px 3px rgba(0, 0, 0, 0.09); + border: 1px solid #666666; border-radius: 0px 12px 12px 0px; height: 70px; top:50%; @@ -301,63 +358,63 @@ cursor: pointer; display: flex; flex-direction: column; - align-items: flex-end; + align-items: center; justify-content: center; + padding-left: 7px; &:hover{ - box-shadow: 1px 0px 7px rgba(0,0,0,0.1); + box-shadow: 0px 0px 8px 3px rgba(0, 0, 0, 0.09); } span{ writing-mode: vertical-lr; - color: #202429; + color: #333; width: 25px; + font-size: 14px; } i{ - color: #24292e; - height: 18px; - line-height: 18px; - width: 18px; + color: #333; + height: 14px; + line-height: 14px; + width: 14px; + margin-left: 2px; + margin-bottom: 3px; } } .downMenu{ - width: 330px; - box-shadow: 0px 0px 9px rgba(134, 134, 134,0.4); + width: 329px; background-color: #fff; - .ant-menu-vertical .ant-menu-item:hover{ - background-color: #e6f7ff; + box-shadow: 0px 1px 8px 1px rgba(212, 212, 212, 0.5); + padding-bottom: 14px; + .ant-menu-item{ + height: 50px; + line-height: 50px; + } +} +.fileMenu{ + width: 83px; + li{ + padding:6px 0px!important; + text-align: center; + width: 100%; } } -.menuslist{ - max-height: 200px; - overflow-y: auto; - padding:10px 15px; - border-radius: 4px; - .ant-dropdown-menu-item{ - border-radius: 8px; - text-align: left!important; - a{ - width: 350px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } - .ant-dropdown-menu-item.active{ - background-color: #e6f7ff; - } -} .catelogue{ - border:1px solid rgb(211, 211, 211); + cursor: pointer; + background: #FAFBFC; + border-radius: 4px; + border: 1px solid #D0D0D0; font-size: 15px; font-weight: normal; - border-radius: 5px; - margin-right: 10px; + margin-right: 12px; padding:0px 10px; height: 30px; line-height: 30px; color: #666!important; display: flex; align-items: center; + &:hover{ + background-color: #F3F4F6; + } span{ margin-top: 1px; } @@ -370,4 +427,24 @@ &:hover{ color: #05101a; } +} +.pinfos{ + i,a{color: #666;} + &:hover i,&:hover a{ + color: #2A61FF!important; + } +} +.graph{ + flex:1; + margin:0px 12px; + .ant-typography{ + white-space: pre-wrap; + margin-bottom: 0px; + } +} +.ant-anchor-wrapper{ + padding-left: 2px; + .ant-anchor-ink::before{ + background-color: #fff; + } } \ No newline at end of file diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 2265ac20d..0cba9123e 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -5,7 +5,7 @@ import { AlignCenter } from '../Component/layout'; import { Link } from 'react-router-dom'; import '../css/index.scss'; import Nodata from '../Nodata'; -import './list.css'; +import './list.scss'; import img_parise from '../Images/parise.png'; class IndexItem extends Component { @@ -41,22 +41,22 @@ class IndexItem extends Component { { !item.is_public && 私有 } { item.forked_from_project_id ? - + - + : "" } { item.type && item.type === 2 ? - + :"" } { item.type && item.type === 1 ? - + - :"" + :"" } diff --git a/src/forge/Main/list.css b/src/forge/Main/list.scss similarity index 84% rename from src/forge/Main/list.css rename to src/forge/Main/list.scss index 43df25ca3..72c3437e9 100644 --- a/src/forge/Main/list.css +++ b/src/forge/Main/list.scss @@ -218,74 +218,92 @@ } /* -----------详情------------ */ .detailHeader-wrapper{ - background-color:#FAFBFC; - /* background: url(../Images/forgeBanner.jpg) no-repeat center; */ - /* background-size:cover; */ + background-color:#FBFCFF; + border-bottom:1px solid #e2e2e2; } .headerMenu-wrapper{ - font-size: 16px; display: flex; flex-direction: row; -} -.headerMenu-wrapper li{ - position: relative; - text-align: center; - height: 40px; - line-height: 28px; - margin-right: 40px; -} -.headerMenu-wrapper li a{ - color: #666; -} -.headerMenu-wrapper li a > img{ - margin-right: 8px; -} -.headerMenu-wrapper li a > span.num{ - height: 28px; - line-height: 29px; - margin-left: 8px; - font-size: 12px; - color: #2878FF; - float: right; -} -.headerMenu-wrapper li.active::after{ - position: absolute; - bottom:0px; - height:2px; - background-color: #5091FF; - content:''; - left: 0px; - width:100%; + cursor: pointer; + li{ + text-align: center; + padding:0px; + margin-right: 40px; + display: flex; + & > a{ + position: relative; + font-size: 14px; + height: 36px; + line-height: 24px; + display: block; + color: #000!important; + &> span.num{ + line-height: 24px; + margin-left: 5px; + font-size: 12px; + float: right; + color: #666!important; + background-color: rgba(153, 153, 153, 0.13);; + border-radius: 50%; + width: 24px; + height: 24px; + } + } + + &.active a::after,&:hover a::after{ + position: absolute; + bottom:0px; + height:2px; + background-color:rgba(153, 153, 153, 0.2); + content:''; + left: 0px; + width:100%; + } + &.active span{ + font-weight: 500; + } + &.active a::after{ + background-color: #466AFF; + } + } } .detail_tag_btn{ - height:26px; - line-height: 26px; + height:32px; + line-height: 32px; border-radius:5px; - border:1px solid #f1f1f1; + border:1px solid #D0D0D0; display: flex; align-items: center; - margin-left: 30px; + margin-left: 10px; padding:0px; - background-color: transparent; + background-color:#FAFBFC; box-shadow: none; + .detail_tag_btn_name{ + padding:0px 10px; + text-align: center; + height: 30px; + line-height: 30px; + border-radius:5px 0px 0px 5px; + &:hover + { + background-color: #F3F4F6; + } + span{ + color: #333!important; + } + } + .detail_tag_btn_count{ + width: 42px; + text-align: center; + background: #fff; + border-radius: 0px 4px 4px 0px; + height:100%; + border-left: 1px solid #D0D0D0; + } } .ant-tooltip { max-width: fit-content!important; } -.detail_tag_btn_name{ - padding:0px 10px; - color: #666!important; -} -.detail_tag_btn_name img{ - margin-right: 10px; -} -.detail_tag_btn_count{ - padding:0px 10px; - background: #fff; - border-radius: 0px 4px 4px 0px; - font-size: 12px; - height:100%; -} .files-md{ padding:20px; } @@ -336,6 +354,7 @@ .gitAddressClone{ + margin:14px 20px!important; display: flex; height: 40px; align-items: center; @@ -499,7 +518,7 @@ } .addFile a{ display: block; - background-color: rgb(76, 172, 255,0.8); + background-color: rgba(76, 172, 255,0.8); color: #fff; cursor: pointer; height: 32px; @@ -514,7 +533,7 @@ border-left: 1px solid rgba(247, 247, 247, 0.3); } .addFile a:active{ - background-color: rgb(76, 172, 255,1); + background-color: rgba(76, 172, 255,1); } @@ -553,7 +572,7 @@ } .commonBox{ border:1px solid #ddd; - margin-top: 30px; + margin-top: 18px; border-radius: 4px; } .commonBox .commonBox-title{ @@ -567,14 +586,28 @@ border-bottom: 1px solid #d9d9d9; border-radius: 4px 4px 0px 0px; } +.readBox{ + border:none; + &.commonBox .commonBox-info{ + border:1px solid #D0D0D0; + border-top: none; + border-radius: 0px 0px 4px 4px; + padding:20px 38px; + } +} .commonBox .commonBox-title.boxTitle{ display: flex; justify-content: space-between; + height: 55px; + line-height: 55px; + background: #FAFCFF; + border-radius: 4px 4px 0px 0px; + border: 1px solid rgba(42, 97, 255, 0.23); } .synchronism{ display: block; - height: 26px; - line-height: 26px; + height: 34px; + line-height: 34px; padding:0px 15px; color: #fff!important; background-color: #28BD6C; @@ -583,10 +616,19 @@ .files_info{ cursor: pointer; } -.commonBox .commonBox-info{ - padding:20px 15px; +.commonBox { + .commonBox-info{ + padding:20px 15px; + } +} +.commonBox-title-read{ + vertical-align: middle; + color: #000; + font-size: 14px; + &:hover { + color: #466AFF; + } } -.commonBox-title-read{vertical-align: middle;color: #666;} @media screen and (max-width: 370px){ .p-r-tags,.p-r-btn{ @@ -627,9 +669,7 @@ .item:last-child{ border-bottom:none; } -.gitAddressClone{ - margin: 0 !important; -} + .item_title small{ font-weight: 400; margin-left: 10px; @@ -732,4 +772,13 @@ a.color-grey-ccc:hover{ text-align: center; display: flex; justify-content: center; +} +.depotNum{ + color: #666!important; + span:last-child{ + color: #333; + } + &:hover span:last-child{ + color: #2A61FF; + } } \ No newline at end of file diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index abce4003a..83268b9e9 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from 'react'; import { Skeleton , Tooltip} from 'antd'; import { Link } from 'react-router-dom'; +import { numFormat } from 'educoder'; function DetailBanner({ history,list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){ const [ menuName , setMenuName ] = useState(undefined); @@ -17,7 +18,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa } },[list]); return( -
    +
    { menuName && projectDetail ?
      @@ -29,39 +30,39 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa item.menu_name === "home" &&
    • - + 主页 - +
    • } { item.menu_name === "code" &&
    • - + 代码库 - +
    • } { item.menu_name === "issues" &&
    • - - - 易修 - {projectDetail && projectDetail.issues_count ? {projectDetail.issues_count} : ""} + + + 易修 + + {projectDetail && projectDetail.issues_count ? {numFormat(projectDetail.issues_count)} : ""} -
    • } { item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
    • - + 合并请求 - {projectDetail && projectDetail.pull_requests_count ? {projectDetail.pull_requests_count} : ""} + {projectDetail && projectDetail.pull_requests_count ? {numFormat(projectDetail.pull_requests_count)} : ""}
    • :"" } @@ -69,7 +70,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa item.menu_name === "wiki" &&
    • - + Wiki
    • @@ -79,29 +80,29 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
    • {/* */} - 工作流(beta版) + 工作流(beta版) {projectDetail && projectDetail.ops_count ? {projectDetail.ops_count} : ""}
    • :"" } { - // item.menu_name === "resources" && - //
    • - // - // - // 资源库 - // {projectDetail && projectDetail.source_count ? {projectDetail.source_count} :""} - // - //
    • + item.menu_name === "resources" && +
    • + + + 资源库 + {projectDetail && projectDetail.source_count ? {projectDetail.source_count} :""} + +
    • } { item.menu_name === "versions" &&
    • - - 里程碑 - {projectDetail && projectDetail.versions_count ? {projectDetail.versions_count} :""} + + 里程碑 + {projectDetail && projectDetail.versions_count ? {numFormat(projectDetail.versions_count)} :""}
    • } @@ -109,7 +110,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa item.menu_name === "activity" &&
    • - + 动态
    • @@ -118,7 +119,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa item.menu_name === "settings" &&
    • - 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}> + 0 ? "iconfont icon-cangkushezhiicon color-grey-3 mr5 font-14":"iconfont icon-cangkushezhiicon color-grey-6 font-14 mr5"}> 仓库设置
    • diff --git a/src/forge/Main/sub/Invite.jsx b/src/forge/Main/sub/Invite.jsx index 61fb40cfc..201cee6dd 100644 --- a/src/forge/Main/sub/Invite.jsx +++ b/src/forge/Main/sub/Invite.jsx @@ -6,7 +6,7 @@ function Invite({code,className}) { return(
      - 邀请码 + 邀请码
      可以通过邀请码邀请成员加入项目
      点击复制邀请码。

      } className="ml8 font-16" inputId="devitecode"/> diff --git a/src/forge/Main/sub/ReadmeCatelogue.jsx b/src/forge/Main/sub/ReadmeCatelogue.jsx new file mode 100644 index 000000000..d1e018bb6 --- /dev/null +++ b/src/forge/Main/sub/ReadmeCatelogue.jsx @@ -0,0 +1,57 @@ +import React , { useState , useEffect } from 'react'; +import { Anchor , Input } from 'antd'; +import './sub.scss'; +import { Base64 } from 'js-base64'; + +const { Link } = Anchor; + +function ReadmeCatelogue({ menuList , hash }) { + const [ goHref , setGoHref ] = useState(""); + const [ value , setValue ] = useState(""); + const [ menu , setMenu] = useState(menuList); + + + function onChange(link){ + setGoHref(link); + }; + + function changeValue(e) { + setValue(e.target.value); + if(e.target.value){ + let m = menuList.filter(i=>i.text.indexOf(e.target.value)>-1); + setMenu(m); + }else{ + setMenu(menuList); + } + } + return( +
      +
      + }/> +
      + { + menu && menu.length>0? +
      + + { + menu.map((item,key)=>{ + return( +
      + +
      + ) + }) + } +
      +
      + :"" + } + +
      + ) +} +export default ReadmeCatelogue; \ No newline at end of file diff --git a/src/forge/Main/sub/UpdateDescModal.jsx b/src/forge/Main/sub/UpdateDescModal.jsx index 5039123a4..b0291f347 100644 --- a/src/forge/Main/sub/UpdateDescModal.jsx +++ b/src/forge/Main/sub/UpdateDescModal.jsx @@ -53,7 +53,7 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website,lesson_u {getFieldDecorator("lesson_url",{ rules:[] })( - + )} diff --git a/src/forge/Main/sub/sub.scss b/src/forge/Main/sub/sub.scss index aa8739710..4e6a3d8ac 100644 --- a/src/forge/Main/sub/sub.scss +++ b/src/forge/Main/sub/sub.scss @@ -24,7 +24,44 @@ } } -.detailsCode{ - display: flex; - justify-content: space-between; +.menuslist{ + z-index: 100; + width: 297px; + background: #FFFFFF; + box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5); + border-radius: 4px; + .searchBox{ + padding:15px; + border-bottom: 1px solid #eee; + } + .ant-anchor-wrapper{ + margin-left: 0px; + padding:5px 15px; + max-height: 255px!important; + .items{ + border-radius: 4px; + margin-bottom: 5px; + cursor: pointer; + .ant-anchor-link-title{ + color: #333333!important; + } + &:hover{ + background-color: #F3F4F6; + } + &.active{ + background-color: #2A61FF; + .ant-anchor-link-title{ + color: #fff!important; + } + } + } + .ant-anchor-link{ + padding:0px; + height: 30px; + line-height: 30px; + } + .ant-anchor-ink::before{ + background-color: #fff; + } + } } \ No newline at end of file diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js index aaaab6c82..832f0a1a4 100644 --- a/src/forge/New/Index.js +++ b/src/forge/New/Index.js @@ -2,9 +2,10 @@ import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { Input , Form , Select , Checkbox , Button , Spin , AutoComplete, Modal } from 'antd'; import { Base64 } from 'js-base64'; +import { AlignCenter } from '../Component/layout'; import '../css/index.scss'; -import './new.css' +import './new.scss' import axios from 'axios'; const Option = Select.Option; @@ -44,7 +45,12 @@ class Index extends Component { project_category_name: undefined, license_name: undefined, ignore_name: undefined, - descNum:0 + descNum:0, + + categoreFlag:false, + languageFlag:false, + ignoreFlag:false, + licenseFlag:false, } } componentDidMount = () => { @@ -149,7 +155,7 @@ class Index extends Component { if (mirror_status === 2 && sessionStorage.newProjectValue) { Modal.warning({ title: '警告', - content: '镜像项目创建失败!请按操作规范重新创建项目!', + content: '项目导入失败!请按操作规范重新导入项目!', }); let newProjectValue = JSON.parse(sessionStorage.newProjectValue); if (newProjectValue) { @@ -189,12 +195,16 @@ class Index extends Component { subMitFrom = () => { this.props.form.validateFieldsAndScroll((err, values) => { + console.log(values); if (!err) { this.setState({ isSpin: true }) const { projectsType } = this.props.match.params; - const { project_language_id, project_category_id, license_id, ignore_id , owners_id , owners_name } = this.state; + const { + project_language_id, project_category_id, license_id, ignore_id , owners_id , + ignoreFlag,licenseFlag,categoreFlag,languageFlag + } = this.state; const decoderPass = Base64.encode(values.password); const url = (projectsType && projectsType === "mirror") ? "/projects/migrate.json" : "/projects.json"; // 新建项目的时候,暂存数据,如果失败,返回的时候可以重新赋值 @@ -202,10 +212,10 @@ class Index extends Component { axios.post(url, { ...values, auth_password:decoderPass, - project_language_id, - project_category_id, - license_id, - ignore_id, + project_language_id:languageFlag ? project_language_id : undefined, + project_category_id:categoreFlag ? project_category_id : undefined, + license_id:licenseFlag ? license_id : undefined, + ignore_id:ignoreFlag ? ignore_id : undefined, user_id:owners_id }).then((result) => { if (result && result.data.id) { @@ -313,41 +323,28 @@ class Index extends Component { mirrorCheck, - descNum + descNum, + + ignoreFlag, + licenseFlag, + languageFlag, + categoreFlag } = this.state; return (
      -
      创建{projectsType && projectsType === "mirror" ? "镜像" : "托管"}项目
      +
      {projectsType && projectsType === "mirror" ? "导入" : "新建"}项目
      - - {getFieldDecorator('user_id', { - rules: [{ - required: true, message: '请选择拥有者' - },{ - validator:(rule, value, callback) => this.checkId(rule, value, callback, OwnerList, '拥有者') - }], - })( - this.ChangePlatform(value, e, 'owners', OwnerList)} - className="plateAutoComplete" - onBlur={(value) => this.blurCategory(value, OwnerList, "owners")} - > - {owners_list} - - )} - - { + + { projectsType && projectsType === "mirror" && {getFieldDecorator('clone_addr', { rules: [{ @@ -362,14 +359,16 @@ class Index extends Component { } { projectsType && projectsType === "mirror" && - +

      - 需要授权验证 - 如果源项目为公有仓库,禁止填写用户名密码。如果源项目为私有仓库,则必须填写正确的用户名和密码!

      + 需要授权验证 + 如果导入项目为私有仓库,则必须填写相应平台正确的用户名和密码 +

      { mirrorCheck && -
      +
      用户名 + 密码 {getFieldDecorator('password', { rules: [], })( - + )}
      } - +
      } + + + {getFieldDecorator('user_id', { + rules: [{ + required: true, message: '请选择拥有者' + },{ + validator:(rule, value, callback) => this.checkId(rule, value, callback, OwnerList, '拥有者') + }], + })( + this.ChangePlatform(value, e, 'owners', OwnerList)} + className="plateAutoComplete" + onBlur={(value) => this.blurCategory(value, OwnerList, "owners")} + > + {owners_list} + + )} + + / + + {getFieldDecorator('name', { + rules: [{ + required: true, message: '请填写项目名称' + }], + })( + + )} + + 项目标识 (项目url标识部分)} + colon={false} > - {getFieldDecorator('name', { + {getFieldDecorator('repository_name', { rules: [{ - required: true, message: '请填写项目名称' + required: true, message: '请填写项目标识' }], })( - + )}
      {descNum}/200 {getFieldDecorator('description', { - rules: [{ - required: true, message: '请填写项目简介' - }], + rules: [], })( )}
      - - {getFieldDecorator('repository_name', { - rules: [{ - required: true, message: '请填写仓库名称' - }], - })( - - )} - - - {getFieldDecorator('project_category', { - rules: [{ - required: true, message: '请选择大类别', - }, { - validator: (rule, value, callback) => this.checkId(rule, value, callback, CategoryList, '项目类别') - }], - })( - this.ChangePlatform(value, e, 'project_category', CategoryList)} - className="plateAutoComplete" - onBlur={(value) => this.blurCategory(value, CategoryList, "project_category")} - > - {project_category_list} - - )} - - - {getFieldDecorator('project_language', { - rules: [{ - required: true, message: '请选择项目语言' - }, { - validator: (rule, value, callback) => this.checkId(rule, value, callback, LanguageList, '项目语言') - }], - })( - this.ChangePlatform(value, e, 'project_language', LanguageList)} - className="plateAutoComplete" - onBlur={(value) => this.blurCategory(value, LanguageList, "project_language")} - > - {project_language_list} - - )} - + { (projectsType === "deposit" || !projectsType) && - {getFieldDecorator('ignore', { - rules: [{ - required: true, message: '请选择gitignore' - }, { - validator: (rule, value, callback) => this.checkId(rule, value, callback, GitignoreList, 'gitignore') - }], - })( - this.ChangePlatform(value, e, 'ignore', GitignoreList)} - className="plateAutoComplete" - onBlur={(value) => this.blurCategory(value, GitignoreList, "ignore")} - > - {ignore_list} - + {getFieldDecorator('ignoreFlag')( + this.setState({ignoreFlag:e.target.checked})}>.gitignore )} + { ignoreFlag && + + {getFieldDecorator('ignore', { + rules: [{ + required: ignoreFlag, message: '请选择gitignore' + }, { + validator: (rule, value, callback) => this.checkId(rule, value, callback, GitignoreList, 'gitignore') + }], + })( + this.ChangePlatform(value, e, 'ignore', GitignoreList)} + className="plateAutoComplete" + onBlur={(value) => this.blurCategory(value, GitignoreList, "ignore")} + > + {ignore_list} + + )} + + } - {getFieldDecorator('license', { - rules: [{ - required: true, message: '请选择开源许可证' - }, { - validator: (rule, value, callback) => this.checkId(rule, value, callback, LicensesList, '开源许可证') - }], - })( - this.ChangePlatform(value, e, 'license', LicensesList)} - className="plateAutoComplete" - onBlur={(value) => this.blurCategory(value, LicensesList, "license")} - > - {license_list} - + {getFieldDecorator('licenseFlag')( + this.setState({licenseFlag:e.target.checked})}>开源许可证 )} + { licenseFlag && + + {getFieldDecorator('license', { + rules: [{ + required: licenseFlag, message: '请选择开源许可证' + }, { + validator: (rule, value, callback) => this.checkId(rule, value, callback, LicensesList, '开源许可证') + }], + })( + this.ChangePlatform(value, e, 'license', LicensesList)} + className="plateAutoComplete" + onBlur={(value) => this.blurCategory(value, LicensesList, "license")} + > + {license_list} + + )} + + } } {getFieldDecorator('private')( - 将项目设为私有(只有项目所有人或拥有权限的项目成员才能看到) + 将项目设为私有(只有项目所有人或拥有权限的项目成员才能看到) )} { projectsType && projectsType === "mirror" && {getFieldDecorator('is_mirror')( @@ -537,12 +536,69 @@ class Index extends Component { )} } -
      + + {getFieldDecorator('categoreFlag')( + this.setState({categoreFlag:e.target.checked})}>项目类别 + )} + + {categoreFlag && + + {getFieldDecorator('project_category', { + rules: [{ + required: categoreFlag, message: '请选择项目类别', + }, { + validator: (rule, value, callback) => this.checkId(rule, value, callback, CategoryList, '项目类别') + }], + })( + this.ChangePlatform(value, e, 'project_category', CategoryList)} + className="plateAutoComplete" + onBlur={(value) => this.blurCategory(value, CategoryList, "project_category")} + > + {project_category_list} + + )} + + } + + {getFieldDecorator('languageFlag')( + this.setState({languageFlag:e.target.checked})}>项目语言 + )} + + {languageFlag && + + {getFieldDecorator('project_language', { + rules: [{ + required: languageFlag, message: '请选择项目语言' + }, { + validator: (rule, value, callback) => this.checkId(rule, value, callback, LanguageList, '项目语言') + }], + })( + this.ChangePlatform(value, e, 'project_language', LanguageList)} + className="plateAutoComplete" + onBlur={(value) => this.blurCategory(value, LanguageList, "project_language")} + > + {project_language_list} + + )} + + } +
      注: 为必填项,否则为选填
      - - 取消 + + 取消
      diff --git a/src/forge/New/new.css b/src/forge/New/new.scss similarity index 72% rename from src/forge/New/new.css rename to src/forge/New/new.scss index fcb6fa8cf..15aca70b2 100644 --- a/src/forge/New/new.css +++ b/src/forge/New/new.scss @@ -12,7 +12,13 @@ border-bottom: 1px solid #f0f0f0 } .newPanel_content{ - padding:1rem 2rem; + padding:2rem; +} +.newPanel_content form .ant-row.ant-form-item{ + margin-bottom: 25px; +} +.newPanel_content .ant-form-item-label label{ + font-size: 16px; } .newPanel_content .ant-form-item-control-wrapper{ flex: 1; @@ -25,24 +31,35 @@ height: 35px; line-height: 35px; } - .newContent_inline{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items:flex-end } +.explainPos{ + .ant-form-explain{ + position: absolute; + } +} .newContent_inline > .ant-form-item:nth-child(2){ margin-left: 20px; } -.newPanel_content .privatePart .ant-form-item-label{ - margin-left: 0px; +.privatePart{ + margin-bottom: 0px!important; + .ant-form-item-label{ + margin-left: 0px; + } } .newPanel_content .ant-form-item-label{ line-height: 25px; height: 25px; - margin-left: -0.8rem; +} +.plateAutoComplete{ + .ant-input{ + height: 34px!important; + } } @media screen and (max-width: 750px){ .newPanel_content{ diff --git a/src/forge/Notice/UndoEvent.jsx b/src/forge/Notice/UndoEvent.jsx index 18cb6d4a3..17dcc3216 100644 --- a/src/forge/Notice/UndoEvent.jsx +++ b/src/forge/Notice/UndoEvent.jsx @@ -61,7 +61,7 @@ function UndoEvent(props){ return(
      -
      +
      { list && list.length > 0 ?
        diff --git a/src/forge/Order/Milepost.js b/src/forge/Order/Milepost.js index 5f6efeeb9..48fc286ba 100644 --- a/src/forge/Order/Milepost.js +++ b/src/forge/Order/Milepost.js @@ -119,11 +119,12 @@ class Milepost extends Component { } ChangePage = (page) => { + document.body.scrollIntoView(); this.setState({ page }) - - this.getList(page); + const { status } = this.state; + this.getList( page , status ); } // 排序 @@ -260,7 +261,7 @@ class Milepost extends Component { { data && data.versions_count > limit ?
        - +
        : "" }
      diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index c3150323f..55c1efdda 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -16,7 +16,7 @@ const menu = [ {name:"合并请求",index:"pulls"}, {name:"Wiki",index:"wiki"}, {name:"工作流(beta版)",index:"devops"}, - // {name:"资源库",index:"resources"}, + {name:"资源库",index:"resources"}, {name:"里程碑",index:"versions"}, {name:"动态",index:"activity"}, ] diff --git a/src/forge/Team/Group/GroupForm.jsx b/src/forge/Team/Group/GroupForm.jsx index dad9b64b9..94825905f 100644 --- a/src/forge/Team/Group/GroupForm.jsx +++ b/src/forge/Team/Group/GroupForm.jsx @@ -34,13 +34,6 @@ export default Form.create()( const { getFieldDecorator, validateFields, setFieldsValue } = form; const { OIdentifier, groupId } = match.params; - useEffect(()=>{ - setFieldsValue({ - authorize:"read", - includes_all_project:0 - }) - },[]) - useEffect(() => { if (GroupDetail) { setOnwers(GroupDetail.authorize === "owner"); diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx index 7e64c5de2..ea23ab079 100644 --- a/src/forge/Team/List.jsx +++ b/src/forge/Team/List.jsx @@ -61,14 +61,14 @@ function List(props){
) const menu_new=( - - - {props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建托管项目 - - - {props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>新建镜像项目 - - +
    +
  • + {props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建项目 +
  • +
  • + {props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>导入项目 +
  • +
) return( @@ -81,7 +81,7 @@ function List(props){

{ organizeDetail && organizeDetail.can_create_project ? - + + 新建项目 :""} diff --git a/src/forge/Team/RightBox.jsx b/src/forge/Team/RightBox.jsx index 7616fd6ca..5c85ae474 100644 --- a/src/forge/Team/RightBox.jsx +++ b/src/forge/Team/RightBox.jsx @@ -108,7 +108,7 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet

{ (item.is_admin || item.is_member) ? - {item.name} + {item.nickname} : {item.name} } diff --git a/src/forge/Team/Setting/TeamSettingCommon.jsx b/src/forge/Team/Setting/TeamSettingCommon.jsx index 5bab8f53f..499a00c20 100644 --- a/src/forge/Team/Setting/TeamSettingCommon.jsx +++ b/src/forge/Team/Setting/TeamSettingCommon.jsx @@ -1,5 +1,5 @@ import React, { forwardRef , useCallback , useEffect, useState } from 'react'; -import { Form , Input , Radio ,Checkbox , Divider , Button } from 'antd'; +import { Form , Input , Radio ,Checkbox , Divider , Button , InputNumber } from 'antd'; import { WhiteBack , FlexAJ } from '../../Component/layout'; import Title from '../../Component/Title'; import styled from 'styled-components'; @@ -31,7 +31,8 @@ export default Form.create()( useEffect(()=>{ if(organizeDetail){ setFieldsValue({ - ...organizeDetail + ...organizeDetail, + max_repo_creation:organizeDetail.max_repo_creation===-1 ? "":organizeDetail.max_repo_creation }) setImage(organizeDetail.avatar_url); setDescNum(organizeDetail.description ? organizeDetail.description.length : 0); @@ -39,10 +40,10 @@ export default Form.create()( },[organizeDetail]) const helper = useCallback( - (label, name, rules, widget , isRequired , flag ) => ( + (label, name, rules, widget , isRequired , flag , help ) => (
{label} - + {getFieldDecorator(name, { rules, validateFirst: true , valuePropName:flag ? "checked":"value" })(widget)}
@@ -175,7 +176,8 @@ export default Form.create()( '最大仓库数:', "max_repo_creation", [], - + ,false,false, + "当输入栏为空时,默认数量无限制" )}

选择头像:

diff --git a/src/forge/UsersList/common_users.js b/src/forge/UsersList/common_users.js index dac45f480..e8404b387 100644 --- a/src/forge/UsersList/common_users.js +++ b/src/forge/UsersList/common_users.js @@ -93,7 +93,13 @@ class CommonUsers extends Component { {count === 0 ? ( ) : ( - + )}
diff --git a/src/forge/Wiki/Welcome/index.css b/src/forge/Wiki/Welcome/index.css new file mode 100644 index 000000000..d146549c8 --- /dev/null +++ b/src/forge/Wiki/Welcome/index.css @@ -0,0 +1,51 @@ +.welcome-main { + display: flex; + flex-flow: column nowrap; + justify-content: center; + align-items: center; + width: 1200px; + min-height: 400px; + padding: 20px; + margin: 20px auto; + background: #fafcff; + font-family: "PingFangSC-Medium"; + border-radius: 4px; + border: 1px solid rgba(42, 97, 255, 0.23); +} +.welcome-main .icon-huanying_icon { + font-size: 48px !important; + font-weight: 700; +} +.welcome-main .welcome-title { + display: inline-flex; + align-items: center; + margin: 10px 0; + font-size: 26px; + color: #333333; + font-weight: 500; +} +.welcome-main .wiki-title { + display: inline-block; + max-width: 20em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.welcome-main .welcome-content { + font-size: 14px; + color: #333333; + font-weight: 400; +} +.welcome-main .wiki-line { + margin: 50px 0 40px; + width: 400px; + height: 1px; + background: #eeeeee; +} +.welcome-main .welcome-des { + font-size: 16px; + color: #333333; + font-weight: 500; +} + +/*# sourceMappingURL=index.css.map */ diff --git a/src/forge/Wiki/components/FolderTree/index.js b/src/forge/Wiki/components/FolderTree/index.js index bbcdb3906..93c06ff3f 100644 --- a/src/forge/Wiki/components/FolderTree/index.js +++ b/src/forge/Wiki/components/FolderTree/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; import classNames from 'classnames'; -import { Icon, Tree } from 'antd'; +import { Tree } from 'antd'; import omit from 'omit.js'; import debounce from 'lodash/debounce'; import { conductExpandParent, convertTreeToEntities } from 'rc-tree/lib/util'; diff --git a/src/forge/Wiki/components/Login/index.css b/src/forge/Wiki/components/Login/index.css new file mode 100644 index 000000000..448243d6d --- /dev/null +++ b/src/forge/Wiki/components/Login/index.css @@ -0,0 +1,56 @@ +.delete-modal .ant-modal-header { + padding: 9px 24px; + background: #f8f8f8; + border-bottom: 1px solid #eee; +} +.delete-modal .ant-modal-title { + text-align: left; +} +.delete-modal .ant-modal-close { + top: 0px !important; +} +.delete-modal .ant-modal-close-x { + font-size: 24px; +} +.delete-modal .ant-modal-body { + text-align: center; +} +.delete-modal .delete-title { + display: flex; + justify-content: center; + align-items: center; + margin: 2rem 0 1rem !important; + font-size: 16px; + color: #333; + letter-spacing: 0; + line-height: 29px; + font-weight: 400; +} +.delete-modal .red-circle { + align-self: flex-start; + color: #ca0002; + font-size: 1.5rem !important; +} +.delete-modal .delete-descibe { + font-size: 14px; + color: #666; + line-height: 33px; + font-weight: 400; +} +.delete-modal .ant-modal-footer { + padding: 2rem 0; + text-align: center; + border: 0; +} +.delete-modal .ant-modal-footer .ant-btn { + width: 6rem; +} +.delete-modal .foot-submit { + margin-left: 3rem; + color: #df0002; +} +.delete-modal .foot-submit:hover { + border-color: #df0002; +} + +/*# sourceMappingURL=index.css.map */ diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 00e46b6f8..d9a5b071c 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -11,7 +11,10 @@ ul,ol,dl{ font-size: 22px; font-weight: normal; line-height: 30px; - max-width: 850px; + max-width: 690px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; .projectN{ word-break: break-all; } @@ -270,4 +273,16 @@ form{ background-color: #DF0002!important; border-color: #DF0002; color: #fff; +} +.newPopUl{ + li{ + height: 30px; + line-height: 30px; + border-bottom: 1px solid #eee; + min-width: 78px; + text-align: center; + &:last-child{ + border-bottom: none; + } + } } \ No newline at end of file diff --git a/src/forge/users/Index.css b/src/forge/users/Index.css new file mode 100644 index 000000000..280cce1b3 --- /dev/null +++ b/src/forge/users/Index.css @@ -0,0 +1,247 @@ +.headerbox { + padding: 20px; + border-bottom: 1px solid #E0E0E0; + display: flex; + align-items: center; + justify-content: space-between; +} +.headerbox > div { + width: 400px; +} +.headerbox > p { + display: flex; + align-items: center; +} +.headerbox > p a { + color: #5091FF; + margin-left: 30px; + font-size: 16px; + display: flex; + align-items: center; +} +.headerbox .ant-btn.ant-input-search-button { + margin-top: -1px; + margin-right: -1px; +} + +.echartBox { + border: 1px solid #DEDEDE; +} +.echartBox > p { + color: #999; + padding: 15px 20px; + text-align: center; +} + +.contentBox { + padding: 20px 20px 0px 20px; +} +.contentBox > div { + margin-bottom: 20px; + display: flex; + align-items: center; + padding: 20px 25px; + background-color: #fafafa; +} +.contentBox > div .imgBox { + width: 190px; + height: 90px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 20px; + background-color: #fff; +} +.contentBox > div .imgBox img { + max-width: 90%; + max-height: 90%; +} +.contentBox .item-news { + display: flex; + justify-content: space-between; + font-size: 12px; + color: #888; + margin-top: 3px; + margin-bottom: 0px; +} +.contentBox .teamdesc { + word-break: break-all; + line-height: 20px; +} + +.infosType { + padding: 20px 30px 0px 20px; + display: flex; + justify-content: space-between; +} +.infosType .infoStatus { + height: 30px; + background: white; + border-radius: 15px; + border: 1px solid #dddddd; + line-height: 30px; + font-size: 12px; + color: #888; + display: flex; +} +.infosType .infoStatus > span { + display: block; + padding: 0px 12px; + border-radius: 15px; + cursor: pointer; +} +.infosType .infoStatus > span.active { + background-color: #5091FF; + color: #fff; + padding: 0px 15px; +} +.infosType .infoStatus .statusDivider { + margin: 8px 0 0 0 !important; +} + +.userDescription { + color: #666666; + line-height: 18px; + text-align: left; + margin: 10px 0px; + word-break: break-all; + text-align: justify; + font-size: 16px; + text-align: center; +} + +.focusBox, .infoBox { + width: 100% !important; + display: inline-block; + margin-top: 30px; + padding-top: 30px; + border-top: 1px solid #f1f1f1; +} + +.infoBox { + padding-bottom: 10px; + text-align: left; + line-height: 28px; + color: #666; + margin-top: 20px; +} +.infoBox > div { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.infoBox i { + color: #DEDEDE; + font-size: 15px !important; +} +.infoBox span { + margin-left: 10px; +} + +.headimg { + position: relative; + display: block; +} +.headimg img { + width: 110px; + height: 110px; + border-radius: 50%; +} +.headimg span { + position: absolute; + bottom: -6px; + right: 0px; + left: 65px; +} +.headimg span i { + font-size: 25px !important; + border-radius: 50%; + color: #fff; +} +.headimg span i.icon-nan1 { + background-color: #1890FF; +} +.headimg span i.icon-nv1 { + background-color: pink; +} + +ul.ant-menu.menuStyle { + padding: 0px 30px; + font-size: 16px; +} +ul.ant-menu.menuStyle li { + height: 70px; + line-height: 70px; + padding: 0px; + margin-right: 30px !important; + border-bottom: transparent !important; +} + +.disposeInfo { + padding: 0px 30px; + min-height: 400px; +} +.disposeInfo .disposeItem { + display: flex; + justify-content: space-between; + padding: 30px 0px; + border-bottom: 1px solid #eee; +} + +.authTag { + display: inline-block; + padding: 0px 10px; + border-radius: 12px; + font-size: 12px; + height: 22px; + line-height: 22px; +} +.authTag.red { + border: 1px solid #F73030; + color: #F73030; +} +.authTag.green { + border: 1px solid #28BD6C; + color: #28BD6C; +} + +.CIList { + padding: 0px 30px; + min-height: 400px; +} +.CIList li { + display: flex; + justify-content: space-between; + padding: 28px 0px; + border-bottom: 1px solid #eee; +} + +.infosRightMenu .ant-menu-item { + padding: 0px; + margin: 0px 20px !important; + font-size: 17px; + height: 32px; + line-height: 0px; + border-bottom: 2px solid transparent !important; + position: relative; +} +.infosRightMenu .ant-menu-item a > i { + font-size: 15px !important; + margin-right: 8px; +} +.infosRightMenu .ant-menu-item .menuNum { + font-size: 12px; + margin-left: 3px; + color: #FF6E21; +} +.infosRightMenu .ant-menu-item.ant-menu-item-selected::before { + position: absolute; + width: 100%; + bottom: -1px; + height: 2px; + left: 0px; + background-color: #1890ff; + content: ""; +} + +/*# sourceMappingURL=Index.css.map */ diff --git a/src/forge/users/InfosUser.js b/src/forge/users/InfosUser.js index 276a0b1f8..bcfd75ffc 100644 --- a/src/forge/users/InfosUser.js +++ b/src/forge/users/InfosUser.js @@ -114,14 +114,14 @@ class InfosUser extends Component { ); newItem =()=> ( - - - {this.props.history.push('/projects/mirror/new')}}>新建镜像项目 - - - {this.props.history.push('/projects/deposit/new')}} >新建托管项目 - - +
    +
  • + {this.props.history.push('/projects/deposit/new')}} >新建项目 +
  • +
  • + {this.props.history.push('/projects/mirror/new')}}>导入项目 +
  • +
); @@ -192,6 +192,7 @@ class InfosUser extends Component { trigger={["hover"]} placement="bottom" className="mr50" + overlayClassName="newPopUl" > diff --git a/src/forge/users/Team-item.jsx b/src/forge/users/Team-item.jsx index f0c6d6013..5efdbe22c 100644 --- a/src/forge/users/Team-item.jsx +++ b/src/forge/users/Team-item.jsx @@ -6,7 +6,7 @@ function TeamItem({item,history}){
{history.push(`/${item.name}`)}} style={{cursor:"pointer"}}>
- {item.name} + {item.nickname}
{item.description}
diff --git a/src/images/add.png b/src/images/add.png new file mode 100644 index 000000000..6a1f55eb9 Binary files /dev/null and b/src/images/add.png differ diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js index ad25fa9c4..e1c06eda7 100644 --- a/src/modules/tpm/challengesnew/tpm-md-editor.js +++ b/src/modules/tpm/challengesnew/tpm-md-editor.js @@ -134,6 +134,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla }, toolbarIconsClass: { "line-break": "fa-minus", + "fullScreen":"iconfont icon-fangdaicon font-14" }, toolbarCustomIcons: { "inline-latex": "
", @@ -150,6 +151,10 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla } cm.replaceSelection(NULL_CH) }, + "fullScreen":function(cm,icon,cursor,selection){ + icon.addClass("none"); + console.log(cm,icon) + }, "inline-latex": function (cm, icon, cursor, selection) { cm.replaceSelection("$$" + selection + "$$"); cm.setCursor(cursor.line, cursor.ch + 2); @@ -164,7 +169,8 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla lang: { toolbar: { "latex": "多行公式", - "line-break": "换行" + "line-break": "换行", + "fullScreen":"开启全屏" } }, onload: function () { @@ -229,7 +235,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla if (resizeBarEl.current) { let el = resizeBarEl.current let dragging = false - let startY = 0 + let startY = 0 function onMouseDown(e) { dragging = true startY = e.pageY diff --git a/src/modules/tpm/newshixuns/css/Newshixuns.css b/src/modules/tpm/newshixuns/css/Newshixuns.css index 7dc811d03..f1a196f6c 100644 --- a/src/modules/tpm/newshixuns/css/Newshixuns.css +++ b/src/modules/tpm/newshixuns/css/Newshixuns.css @@ -392,9 +392,6 @@ a.white-btn.use_scope-btn:hover{ border-color: #096dd9; } -/*.ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active{*/ -/* background-color: #4CACFF;*/ -/*}*/ .newViewAfter .ant-input{ line-height: 40px !important;