diff --git a/public/css/edu-common.css b/public/css/edu-common.css index 96a8277d..56790f05 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 3cbe5fcb..1d995903 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 f721824b..5011767d 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1364,7 +1364,7 @@ a:visited { } a:hover { - color: #459be5; + color: #2A61FF!important; } ol, @@ -1473,7 +1473,7 @@ a.edu-txt-w80, /*隐藏*/ .none { - display: none + display: none!important; } .block { @@ -2471,19 +2471,16 @@ 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: #0054CC!important; } /* 绿色 */ .color-green-file{ @@ -2494,10 +2491,6 @@ a.color-grey-c:hover { color: #4CACFF !important; } -a.color-blue:hover, -a.color-blue_4C:hover { - color: #459BE6 !important; -} /*橙色*/ .color-orange { diff --git a/public/css/iconfont.css b/public/css/iconfont.css index cb32b1a9..8b932c6b 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1627870211301') format('woff2'), - url('iconfont.woff?t=1627870211301') format('woff'), - url('iconfont.ttf?t=1627870211301') format('truetype'); + src: url('iconfont.woff2?t=1628649437297') format('woff2'), + url('iconfont.woff?t=1628649437297') format('woff'), + url('iconfont.ttf?t=1628649437297') format('truetype'); } .iconfont { @@ -13,6 +13,150 @@ -moz-osx-font-smoothing: grayscale; } +.icon-dianzan_icon:before { + content: "\e8ba"; +} + +.icon-quxiaoguanzhu:before { + content: "\e8bb"; +} + +.icon-xieyiicon:before { + content: "\e8a6"; +} + +.icon-daimakuicon:before { + content: "\e8a9"; +} + +.icon-zhuyeicon:before { + content: "\e884"; +} + +.icon-biaoqianicon:before { + content: "\e882"; +} + +.icon-a-bianji:before { + content: "\e883"; +} + +.icon-cangkushezhiicon:before { + content: "\e885"; +} + +.icon-fuzhiicon:before { + content: "\e886"; +} + +.icon-lianjieicon:before { + content: "\e887"; +} + +.icon-hebingqingqiuicon:before { + content: "\e888"; +} + +.icon-lichengbeiicon:before { + content: "\e889"; +} + +.icon-gongzuoliuicon:before { + content: "\e88a"; +} + +.icon-dongtaiicon:before { + content: "\e88b"; +} + +.icon-morendianzan_icon:before { + content: "\e88e"; +} + +.icon-neicunicon:before { + content: "\e891"; +} + +.icon-muluicon:before { + content: "\e894"; +} + +.icon-tianjia1:before { + content: "\e896"; +} + +.icon-a-shezhi:before { + content: "\e899"; +} + +.icon-wenjian5:before { + content: "\e89a"; +} + +.icon-tijiaoicon:before { + content: "\e89e"; +} + +.icon-morenguanzhu_ICON:before { + content: "\e89f"; +} + +.icon-wenjianjia3:before { + content: "\e8a2"; +} + +.icon-xialaanniu1:before { + content: "\e8a4"; +} + +.icon-zishuwenjian_icon:before { + content: "\e8b0"; +} + +.icon-zuohuaicon:before { + content: "\e8b5"; +} + +.icon-master_icon:before { + content: "\e8b6"; +} + +.icon-morenfuke_icon:before { + content: "\e8b7"; +} + +.icon-a-wikiicon:before { + content: "\e8b8"; +} + +.icon-yixiuicon:before { + content: "\e8b9"; +} + +.icon-suofang:before { + content: "\e87f"; +} + +.icon-fangdaicon:before { + content: "\e881"; +} + +.icon-sousuo_icon1:before { + content: "\e873"; +} + +.icon-huanying_icon:before { + content: "\e878"; +} + +.icon-wenjianjia2:before { + content: "\e879"; +} + +.icon-shanchuicon1:before { + content: "\e87a"; +} + .icon-qingqiuicon:before { content: "\e871"; } @@ -49,10 +193,6 @@ content: "\e898"; } -.icon-xialaanniu_icon:before { - content: "\e89a"; -} - .icon-weixuanzhongqingqiuicon:before { content: "\e89b"; } @@ -61,10 +201,6 @@ content: "\e8a1"; } -.icon-xuanzhongxiangyingicon:before { - content: "\e8a2"; -} - .icon-xuanzhongfenzhiicon:before { content: "\e8a3"; } @@ -81,18 +217,6 @@ content: "\e8af"; } -.icon-xinzengmulu_xuantingicon:before { - content: "\e884"; -} - -.icon-xinzengyemian_morenicon:before { - content: "\e885"; -} - -.icon-zhankai_morenicon:before { - content: "\e889"; -} - .icon-shanchu_tc_icon:before { content: "\e88c"; } @@ -101,10 +225,6 @@ content: "\e88d"; } -.icon-xinzengyemian_shubiaodianjiicon:before { - content: "\e88e"; -} - .icon-daorumoban_icon:before { content: "\e86f"; } @@ -117,10 +237,6 @@ content: "\e872"; } -.icon-chenggong1:before { - content: "\e873"; -} - .icon-gengduo_icon:before { content: "\e874"; } @@ -137,18 +253,6 @@ content: "\e877"; } -.icon-a-lajitong_icon3x:before { - content: "\e878"; -} - -.icon-shouqi_morenicon:before { - content: "\e879"; -} - -.icon-huanying_icon:before { - content: "\e87a"; -} - .icon-sousuo_shanchuicon:before { content: "\e87b"; } @@ -161,22 +265,10 @@ content: "\e87e"; } -.icon-wenjianjia_icon:before { - content: "\e87f"; -} - .icon-xialaanniu:before { content: "\e880"; } -.icon-xinzengmulu_morenicon:before { - content: "\e882"; -} - -.icon-xinzengmulu_shubiaodianjiicon:before { - content: "\e883"; -} - .icon-erciqueren_icon:before { content: "\e867"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 55eeef19..484af6bd 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); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index 2342c797..9a1aff02 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,258 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "23492900", + "name": "点赞_icon", + "font_class": "dianzan_icon", + "unicode": "e8ba", + "unicode_decimal": 59578 + }, + { + "icon_id": "23492901", + "name": "取消关注", + "font_class": "quxiaoguanzhu", + "unicode": "e8bb", + "unicode_decimal": 59579 + }, + { + "icon_id": "23473801", + "name": "协议icon", + "font_class": "xieyiicon", + "unicode": "e8a6", + "unicode_decimal": 59558 + }, + { + "icon_id": "23473151", + "name": "代码库icon", + "font_class": "daimakuicon", + "unicode": "e8a9", + "unicode_decimal": 59561 + }, + { + "icon_id": "23473104", + "name": "主页icon", + "font_class": "zhuyeicon", + "unicode": "e884", + "unicode_decimal": 59524 + }, + { + "icon_id": "23472253", + "name": "标签icon", + "font_class": "biaoqianicon", + "unicode": "e882", + "unicode_decimal": 59522 + }, + { + "icon_id": "23472254", + "name": "编 辑", + "font_class": "a-bianji", + "unicode": "e883", + "unicode_decimal": 59523 + }, + { + "icon_id": "23472256", + "name": "仓库设置icon", + "font_class": "cangkushezhiicon", + "unicode": "e885", + "unicode_decimal": 59525 + }, + { + "icon_id": "23472257", + "name": "复制icon", + "font_class": "fuzhiicon", + "unicode": "e886", + "unicode_decimal": 59526 + }, + { + "icon_id": "23472258", + "name": "链接icon", + "font_class": "lianjieicon", + "unicode": "e887", + "unicode_decimal": 59527 + }, + { + "icon_id": "23472259", + "name": "合并请求icon", + "font_class": "hebingqingqiuicon", + "unicode": "e888", + "unicode_decimal": 59528 + }, + { + "icon_id": "23472260", + "name": "里程碑icon", + "font_class": "lichengbeiicon", + "unicode": "e889", + "unicode_decimal": 59529 + }, + { + "icon_id": "23472261", + "name": "工作流icon", + "font_class": "gongzuoliuicon", + "unicode": "e88a", + "unicode_decimal": 59530 + }, + { + "icon_id": "23472262", + "name": "动态icon", + "font_class": "dongtaiicon", + "unicode": "e88b", + "unicode_decimal": 59531 + }, + { + "icon_id": "23472263", + "name": "默认点赞_icon", + "font_class": "morendianzan_icon", + "unicode": "e88e", + "unicode_decimal": 59534 + }, + { + "icon_id": "23472264", + "name": "内存icon", + "font_class": "neicunicon", + "unicode": "e891", + "unicode_decimal": 59537 + }, + { + "icon_id": "23472265", + "name": "目录icon", + "font_class": "muluicon", + "unicode": "e894", + "unicode_decimal": 59540 + }, + { + "icon_id": "23472266", + "name": "添加", + "font_class": "tianjia1", + "unicode": "e896", + "unicode_decimal": 59542 + }, + { + "icon_id": "23472267", + "name": "设 置", + "font_class": "a-shezhi", + "unicode": "e899", + "unicode_decimal": 59545 + }, + { + "icon_id": "23472268", + "name": "文件", + "font_class": "wenjian5", + "unicode": "e89a", + "unicode_decimal": 59546 + }, + { + "icon_id": "23472269", + "name": "提交icon", + "font_class": "tijiaoicon", + "unicode": "e89e", + "unicode_decimal": 59550 + }, + { + "icon_id": "23472270", + "name": "默认关注_ICON", + "font_class": "morenguanzhu_ICON", + "unicode": "e89f", + "unicode_decimal": 59551 + }, + { + "icon_id": "23472271", + "name": "文件夹", + "font_class": "wenjianjia3", + "unicode": "e8a2", + "unicode_decimal": 59554 + }, + { + "icon_id": "23472272", + "name": "下拉按钮", + "font_class": "xialaanniu1", + "unicode": "e8a4", + "unicode_decimal": 59556 + }, + { + "icon_id": "23472275", + "name": "自述文件_icon", + "font_class": "zishuwenjian_icon", + "unicode": "e8b0", + "unicode_decimal": 59568 + }, + { + "icon_id": "23472276", + "name": "左滑icon", + "font_class": "zuohuaicon", + "unicode": "e8b5", + "unicode_decimal": 59573 + }, + { + "icon_id": "23472277", + "name": "master_icon", + "font_class": "master_icon", + "unicode": "e8b6", + "unicode_decimal": 59574 + }, + { + "icon_id": "23472278", + "name": "默认复刻_icon", + "font_class": "morenfuke_icon", + "unicode": "e8b7", + "unicode_decimal": 59575 + }, + { + "icon_id": "23472279", + "name": "wiki icon", + "font_class": "a-wikiicon", + "unicode": "e8b8", + "unicode_decimal": 59576 + }, + { + "icon_id": "23472280", + "name": "易修icon", + "font_class": "yixiuicon", + "unicode": "e8b9", + "unicode_decimal": 59577 + }, + { + "icon_id": "23436350", + "name": "缩放", + "font_class": "suofang", + "unicode": "e87f", + "unicode_decimal": 59519 + }, + { + "icon_id": "23436351", + "name": "放大icon", + "font_class": "fangdaicon", + "unicode": "e881", + "unicode_decimal": 59521 + }, + { + "icon_id": "23384231", + "name": "搜索_icon", + "font_class": "sousuo_icon1", + "unicode": "e873", + "unicode_decimal": 59507 + }, + { + "icon_id": "23384232", + "name": "欢迎_icon", + "font_class": "huanying_icon", + "unicode": "e878", + "unicode_decimal": 59512 + }, + { + "icon_id": "23384233", + "name": "文件夹", + "font_class": "wenjianjia2", + "unicode": "e879", + "unicode_decimal": 59513 + }, + { + "icon_id": "23384234", + "name": "删除icon", + "font_class": "shanchuicon1", + "unicode": "e87a", + "unicode_decimal": 59514 + }, { "icon_id": "23261798", "name": "请求icon", @@ -68,13 +320,6 @@ "unicode": "e898", "unicode_decimal": 59544 }, - { - "icon_id": "23144154", - "name": "下拉按钮_icon", - "font_class": "xialaanniu_icon", - "unicode": "e89a", - "unicode_decimal": 59546 - }, { "icon_id": "23144155", "name": "未选中请求icon", @@ -89,13 +334,6 @@ "unicode": "e8a1", "unicode_decimal": 59553 }, - { - "icon_id": "23144159", - "name": "选中响应icon", - "font_class": "xuanzhongxiangyingicon", - "unicode": "e8a2", - "unicode_decimal": 59554 - }, { "icon_id": "23144160", "name": "选中分支icon", @@ -124,27 +362,6 @@ "unicode": "e8af", "unicode_decimal": 59567 }, - { - "icon_id": "23046282", - "name": "新增目录_悬停icon", - "font_class": "xinzengmulu_xuantingicon", - "unicode": "e884", - "unicode_decimal": 59524 - }, - { - "icon_id": "23046283", - "name": "新增页面_默认icon", - "font_class": "xinzengyemian_morenicon", - "unicode": "e885", - "unicode_decimal": 59525 - }, - { - "icon_id": "23046287", - "name": "展开_默认icon", - "font_class": "zhankai_morenicon", - "unicode": "e889", - "unicode_decimal": 59529 - }, { "icon_id": "23046290", "name": "shanchu_tc_icon", @@ -159,13 +376,6 @@ "unicode": "e88d", "unicode_decimal": 59533 }, - { - "icon_id": "23046311", - "name": "新增页面_鼠标点击icon", - "font_class": "xinzengyemian_shubiaodianjiicon", - "unicode": "e88e", - "unicode_decimal": 59534 - }, { "icon_id": "23046244", "name": "导入模版_icon", @@ -187,13 +397,6 @@ "unicode": "e872", "unicode_decimal": 59506 }, - { - "icon_id": "23046254", - "name": "成功", - "font_class": "chenggong1", - "unicode": "e873", - "unicode_decimal": 59507 - }, { "icon_id": "23046255", "name": "更多_icon", @@ -222,27 +425,6 @@ "unicode": "e877", "unicode_decimal": 59511 }, - { - "icon_id": "23046269", - "name": "垃圾桶_icon@3x", - "font_class": "a-lajitong_icon3x", - "unicode": "e878", - "unicode_decimal": 59512 - }, - { - "icon_id": "23046270", - "name": "收起_默认icon", - "font_class": "shouqi_morenicon", - "unicode": "e879", - "unicode_decimal": 59513 - }, - { - "icon_id": "23046271", - "name": "欢迎_icon", - "font_class": "huanying_icon", - "unicode": "e87a", - "unicode_decimal": 59514 - }, { "icon_id": "23046273", "name": "搜索_删除icon", @@ -264,13 +446,6 @@ "unicode": "e87e", "unicode_decimal": 59518 }, - { - "icon_id": "23046277", - "name": "文件夹_icon", - "font_class": "wenjianjia_icon", - "unicode": "e87f", - "unicode_decimal": 59519 - }, { "icon_id": "23046278", "name": "下拉按钮", @@ -278,20 +453,6 @@ "unicode": "e880", "unicode_decimal": 59520 }, - { - "icon_id": "23046280", - "name": "新增目录_默认icon", - "font_class": "xinzengmulu_morenicon", - "unicode": "e882", - "unicode_decimal": 59522 - }, - { - "icon_id": "23046281", - "name": "新增目录_鼠标点击icon", - "font_class": "xinzengmulu_shubiaodianjiicon", - "unicode": "e883", - "unicode_decimal": 59523 - }, { "icon_id": "22906287", "name": "二次确认_icon", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index 5e5ec5c6..afbf2d99 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index 1f2744da..32bb2f13 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index bb7c16cf..9b7e3911 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/college/colleagecss/colleage.css b/src/college/colleagecss/colleage.css index 9220b8ac..65f32322 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 07e141eb..f1800a75 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 1fc86893..f6258998 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/Select.jsx b/src/forge/Branch/Select.jsx index fedd288c..a44584c4 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 = ( -
-
- - -
- - - -
+ ); 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 00000000..d536d1c9 --- /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 bdd4aa39..04c77666 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; 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; diff --git a/src/forge/Component/Contributors.jsx b/src/forge/Component/Contributors.jsx index 1e26354a..20276ef6 100644 --- a/src/forge/Component/Contributors.jsx +++ b/src/forge/Component/Contributors.jsx @@ -136,8 +136,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)}> { diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx index da984543..c7ff4ea1 100644 --- a/src/forge/Component/Releases.jsx +++ b/src/forge/Component/Releases.jsx @@ -7,14 +7,12 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType} return(
- 发行版 + 发行版 { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}} - { (releaseVersions && releaseVersions.total_count > 0) || projectType ===2 ? - 全部 - : - baseOperate && 新建 - } + {/* { + baseOperate && projectType !==2 && 新建 + } */} { releaseVersions && releaseVersions.total_count>0 ? @@ -32,7 +30,10 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType} ) }) - :"" + : +
+ 您暂未发布任何版本{baseOperate && projectType !==2 && 创建新版本} +
}
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index cfe3c6a8..3b8a16ae 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -345,34 +345,31 @@ function CoderDepot(props){ }
- - - {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(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求 - } - { - issuesFlag && - urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务 - } -
+ baseOperate && projectDetail.type !== 2 && pullsFlag && + + } + { + baseOperate && issuesFlag && + } { fileOperate && - + } @@ -394,10 +391,13 @@ function CoderDepot(props){
{ hideBtn && changeHide(hide)}> } - {lastCommit && lastCommit.time_from_now} - { commitCount ? - {commitCount}次提交 - :"" } + {lastCommit && lastCommit.time_from_now} + { + commitCount ? + + {commitCount}次提交 + :"" + } }