diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 3d27dfda..7035af05 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=1620900836917') format('woff2'), - url('iconfont.woff?t=1620900836917') format('woff'), - url('iconfont.ttf?t=1620900836917') format('truetype'); + src: url('iconfont.woff2?t=1622517296245') format('woff2'), + url('iconfont.woff?t=1622517296245') format('woff'), + url('iconfont.ttf?t=1622517296245') format('truetype'); } .iconfont { @@ -13,6 +13,58 @@ -moz-osx-font-smoothing: grayscale; } +.icon-youxiang:before { + content: "\e8b2"; +} + +.icon-danwei:before { + content: "\e8a7"; +} + +.icon-daibanshixiang:before { + content: "\e8a8"; +} + +.icon-gailan:before { + content: "\e8ab"; +} + +.icon-nan:before { + content: "\e8ac"; +} + +.icon-nv:before { + content: "\e8ad"; +} + +.icon-gongzuoliu1:before { + content: "\e8ae"; +} + +.icon-shujutongji:before { + content: "\e8b1"; +} + +.icon-xiangmu:before { + content: "\e8b3"; +} + +.icon-zuzhi:before { + content: "\e8b4"; +} + +.icon-arrowRight:before { + content: "\e863"; +} + +.icon-jiantouloukong-zuo:before { + content: "\e861"; +} + +.icon-jiantouloukong-you:before { + content: "\e862"; +} + .icon-fenxiang1:before { content: "\e89c"; } @@ -2441,7 +2493,7 @@ content: "\e7f3"; } -.icon-dianzan1:before { +.icon-dianzaned:before { content: "\e639"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index bb4188cd..068c8e0a 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(c){var l,a,h,i,o,z,t='',p=(p=document.getElementsByTagName("script"))[p.length-1].getAttribute("data-injectcss");if(p&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function s(){o||(o=!0,h())}l=function(){var c,l,a;(a=document.createElement("div")).innerHTML=t,t=null,(l=a.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",c=l,(a=document.body).firstChild?(l=a.firstChild).parentNode.insertBefore(c,l):a.appendChild(c))},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,(z=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}s()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,s())})}(window); \ No newline at end of file +!function(c){var l,a,h,i,o,z,t='',p=(p=document.getElementsByTagName("script"))[p.length-1].getAttribute("data-injectcss");if(p&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}l=function(){var c,l,a;(a=document.createElement("div")).innerHTML=t,t=null,(l=a.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",c=l,(a=document.body).firstChild?(l=a.firstChild).parentNode.insertBefore(c,l):a.appendChild(c))},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,(z=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}v()})(),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 ab6ae325..877958d7 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,97 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "21936935", + "name": "邮箱", + "font_class": "youxiang", + "unicode": "e8b2", + "unicode_decimal": 59570 + }, + { + "icon_id": "21936924", + "name": "单位", + "font_class": "danwei", + "unicode": "e8a7", + "unicode_decimal": 59559 + }, + { + "icon_id": "21936925", + "name": "待办事项", + "font_class": "daibanshixiang", + "unicode": "e8a8", + "unicode_decimal": 59560 + }, + { + "icon_id": "21936928", + "name": "概览", + "font_class": "gailan", + "unicode": "e8ab", + "unicode_decimal": 59563 + }, + { + "icon_id": "21936929", + "name": "男", + "font_class": "nan", + "unicode": "e8ac", + "unicode_decimal": 59564 + }, + { + "icon_id": "21936930", + "name": "女", + "font_class": "nv", + "unicode": "e8ad", + "unicode_decimal": 59565 + }, + { + "icon_id": "21936931", + "name": "工作流", + "font_class": "gongzuoliu1", + "unicode": "e8ae", + "unicode_decimal": 59566 + }, + { + "icon_id": "21936934", + "name": "数据统计", + "font_class": "shujutongji", + "unicode": "e8b1", + "unicode_decimal": 59569 + }, + { + "icon_id": "21936936", + "name": "项目", + "font_class": "xiangmu", + "unicode": "e8b3", + "unicode_decimal": 59571 + }, + { + "icon_id": "21936937", + "name": "组织", + "font_class": "zuzhi", + "unicode": "e8b4", + "unicode_decimal": 59572 + }, + { + "icon_id": "14835599", + "name": "右箭头", + "font_class": "arrowRight", + "unicode": "e863", + "unicode_decimal": 59491 + }, + { + "icon_id": "21151489", + "name": "箭头镂空-左", + "font_class": "jiantouloukong-zuo", + "unicode": "e861", + "unicode_decimal": 59489 + }, + { + "icon_id": "21151557", + "name": "箭头镂空-右", + "font_class": "jiantouloukong-you", + "unicode": "e862", + "unicode_decimal": 59490 + }, { "icon_id": "21568989", "name": "分享", @@ -4257,7 +4348,7 @@ { "icon_id": "1004630", "name": "点赞2", - "font_class": "dianzan1", + "font_class": "dianzaned", "unicode": "e639", "unicode_decimal": 58937 }, diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index 23ebbd47..9507b420 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 6b353baa..5bb7cb80 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 3ec15ab0..3f6b8561 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/forge/Main/list.css b/src/forge/Main/list.css index 9854a0a3..bdf93163 100644 --- a/src/forge/Main/list.css +++ b/src/forge/Main/list.css @@ -91,6 +91,7 @@ display: flex; border-bottom:1px solid rgba(238,238,238,1); padding:22px 0px; + justify-content: flex-start; } .boxShandow{ box-shadow:0px 2px 20px 10px rgba(0,0,0,0.03); @@ -100,6 +101,7 @@ height: 60px; border-radius: 50%; margin-right: 22px; + margin-top: 8px; } .p-r-Infos{ flex: 1; @@ -108,6 +110,7 @@ .p-r-name{ display: flex; justify-content: space-between; + align-items: center; } .p-r-name > p{ flex: 1; diff --git a/src/forge/Notice/UndoEvent.jsx b/src/forge/Notice/UndoEvent.jsx index 0e2c6323..68557a9e 100644 --- a/src/forge/Notice/UndoEvent.jsx +++ b/src/forge/Notice/UndoEvent.jsx @@ -77,7 +77,7 @@ function UndoEvent(props){

请求将仓库【{i.project && i.project.name}】 - 转移给【{i.owner && i.owner.name}】,是否接受?

+ 转移给【{i.owner && i.owner.name}】,是否接受?

{ i.status === "common" && diff --git a/src/forge/UsersList/fork_users.js b/src/forge/UsersList/fork_users.js index aaaa9b62..7e042190 100644 --- a/src/forge/UsersList/fork_users.js +++ b/src/forge/UsersList/fork_users.js @@ -97,7 +97,7 @@ class ForkUsers extends Component {
{item.name} diff --git a/src/forge/UsersList/user_list.js b/src/forge/UsersList/user_list.js index 592e9806..5d99bfbd 100644 --- a/src/forge/UsersList/user_list.js +++ b/src/forge/UsersList/user_list.js @@ -27,7 +27,7 @@ class UserList extends Component {
{item.name} diff --git a/src/forge/users/Echart/Calendar.jsx b/src/forge/users/Echart/Calendar.jsx index 8190d32e..d0816ccc 100644 --- a/src/forge/users/Echart/Calendar.jsx +++ b/src/forge/users/Echart/Calendar.jsx @@ -10,7 +10,7 @@ function Calendar({ userLogin , time , chooseTime }) { useEffect(()=>{ if(time){ let e,b = ""; - if(time === "0"){ + if(parseInt(time,0) === parseInt(moment().get('year'),0)){ let y = moment().get('year'); let m = moment().get('month'); let d = moment().get('date'); @@ -52,13 +52,30 @@ function Calendar({ userLogin , time , chooseTime }) { } function getVirtulData(data) { + var date = +echarts.number.parseDate(baginT); + var end = +echarts.number.parseDate(endT); + var dayTime = 3600 * 24 * 1000; var array = []; - for(var i=0;ii.date === stamp); + if(stampFilter && stampFilter.length > 0){ + array.push([stampFilter[0].date,stampFilter[0].contributions]); + }else{ + array.push([stamp,0]); + } } return array; } + function timestampToTime(timestamp) { + var date = new Date(timestamp); + var Y = date.getFullYear() + '-'; + var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; + var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); + return Y+M+D; + } + function Init(data,max) { var huan_val = document.getElementById("Calendar"); var myEcharts = echarts.init(huan_val); @@ -66,7 +83,11 @@ function Calendar({ userLogin , time , chooseTime }) { title: { show:false }, - tooltip: {}, + tooltip: { + formatter:function(params){ + return params.data[0] + ': ' + params.data[1] + '个贡献'; + } + }, visualMap: { min: 0, max: max, @@ -75,15 +96,23 @@ function Calendar({ userLogin , time , chooseTime }) { left: 'center', bottom: 40, inRange:{ - color:['#C7DBFF', '#5291FF'] + color:['#fafafa', '#216e39'] } }, calendar: { - top: 60, - left: 30, - right: 0, + top: 50, + left: 40, + right: 30, cellSize: ['auto', 13], range: [baginT, endT], + splitLine:{ + show:false, + lineStyle:{ + color:"#fff", + width:1, + type:"solid" + } + }, itemStyle: { borderWidth: 0.5 }, @@ -92,7 +121,8 @@ function Calendar({ userLogin , time , chooseTime }) { nameMap:"cn" }, dayLabel:{ - nameMap:"cn" + nameMap:"cn", + firstDay:1 } }, series: { @@ -108,7 +138,7 @@ function Calendar({ userLogin , time , chooseTime }) { } return( -
+
) } export default Calendar; \ No newline at end of file diff --git a/src/forge/users/Echart/Line.jsx b/src/forge/users/Echart/Line.jsx index f7b515cd..e8c9ac64 100644 --- a/src/forge/users/Echart/Line.jsx +++ b/src/forge/users/Echart/Line.jsx @@ -15,22 +15,20 @@ function Line({data}) { let option = { color: ["#f8e367", "#58c0f0", "#ff9e48"], title: { - text: '近期活动统计', - left: '3%', - top:"3%" + show:false }, tooltip: { trigger: 'axis' }, legend: { - data: ['commits', 'issues', 'pull_requests'], + data: ['提交数', '易修数', '合并请求数'], right: 'center', - bottom: '0', + bottom: '4%', }, grid: { left: '4%', - right: '4%', - bottom: '12%', + right: '5%', + bottom: '16%', containLabel: true }, toolbox: { @@ -53,21 +51,23 @@ function Line({data}) { }, axisTick:{ show:false - } + }, + minInterval:1, + splitNumber: 5, }, series: [ { - name: 'commits', + name: '提交数', type: 'line', data: d.commits_count }, { - name: 'issues', + name: '易修数', type: 'line', data: d.issues_count }, { - name: 'pull_requests', + name: '合并请求数', type: 'line', data: d.pull_requests_count } diff --git a/src/forge/users/Echart/Radar.jsx b/src/forge/users/Echart/Radar.jsx index 35430958..5a75f2c8 100644 --- a/src/forge/users/Echart/Radar.jsx +++ b/src/forge/users/Echart/Radar.jsx @@ -51,7 +51,7 @@ function Radar({data}) { } ] }] - }; + }; myEcharts.setOption(option); } diff --git a/src/forge/users/GeneralView/ConcentrateBox.jsx b/src/forge/users/GeneralView/ConcentrateBox.jsx index b3d987fe..bd0b04db 100644 --- a/src/forge/users/GeneralView/ConcentrateBox.jsx +++ b/src/forge/users/GeneralView/ConcentrateBox.jsx @@ -1,30 +1,49 @@ import React, { useEffect, useState } from 'react'; -import { Modal , Checkbox , Pagination , Button , Spin } from 'antd'; +import { Modal , Checkbox , Spin , Input } from 'antd'; import Axios from 'axios'; import { Link } from 'react-router-dom'; -import { FlexAJ } from '../../Component/layout'; +const { Search } = Input; const limit = 20; function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) { const [ page , setPage ]= useState(1); const [ total , setTotal ]= useState(0); - const [ list , setList ]= useState(undefined); + const [ pageSize , setPageSize ] = useState(false); + const [ search , setSearch ] = useState(undefined); + + const [ list , setList ]= useState([]); const [ value , setValue ]= useState([]); const [ isSpin , setIsSpin ]= useState(true); const [ disable , setDisable ] = useState(false); + const [ loadCount , setLoadCount ]= useState(0); useEffect(()=>{ - if(visible){ + if(visible && loadCount === 0){ + setLoadCount(loadCount+1); setIsSpin(true); getProjectList(); } - },[visible,page]) + },[visible]) useEffect(()=>{ - if(choosed && choosed.length >0 ){ + if(page>1){ + setIsSpin(true); + getProjectList(page,undefined); + } + },[page]) + + useEffect(()=>{ + if(search !== undefined){ + setIsSpin(true); + getProjectList(1,search); + } + },[search]) + + useEffect(()=>{ + if(visible && choosed && choosed.length >0 ){ setValue(choosed); } - },[choosed]) + },[visible,choosed]) useEffect(()=>{ if(value && value.length === 6){ @@ -34,63 +53,91 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) { } },[value]) - function getProjectList() { + function getProjectList(p,s) { const url = `/users/${username}/projects.json`; Axios.get(url,{ params:{ - page,limit,is_public: "public" + page:p,limit,is_public: "public",search:s } }).then(result=>{ if(result && result.data){ + let e = mergeArrayMerge(list,result.data.projects); setTotal(result.data.count); - setList(result.data.projects); + setList(page > 1 ? e : result.data.projects); setIsSpin(false); + + let s = parseInt(result.data.count/limit,0); + let y = result.data.count%limit; + setPageSize(y>0?s+1:s); } }).catch(error=>{}) } + function mergeArrayMerge (array1, array2) { + array1.map((v, index) => { + if (v !== '') { + let idx = array2.indexOf(v); + if (idx > -1) { + array2.splice(idx, 1) + } + } + }); + array1 = array1.concat(array2); + return array1 + } + function onOk() { onSure && onSure(value); setValue([]); } - function chooseProject(params) { - setValue(params); + function chooseProject(e) { + setValue(e); + } + + // 搜索 + function onSearch(params) { + setSearch(params); } return( - {total > limit && - setPage(p)} total={total}/> - } - - - - - - } + onCancel={onCancel} + onOk={onOk} + okText="确定" + cancelText="取消" > - { - list && list.length > 0 && - - { - list.map((i,k)=>{ - return( - j === i.id).length===0)}>{i.name} - ) - }) - } - - } - { list && list.length === 0 &&
您还没有公开的项目,先去新建项目
} +
+

最多可选取6个公开仓库

+ +
+
+ { + list && list.length > 0 && + + { + list.map((i,k)=>{ + return( + j === i.id).length===0)}>{i.name} + ) + }) + } + + } +
+ { total > limit && page < pageSize &&
setPage(page+1)}>查看更多
} + { list && list.length === 0 &&
您还没有公开的{search && `“${search}”`}项目,先去新建项目
}
) diff --git a/src/forge/users/GeneralView/ConcentrateProject.jsx b/src/forge/users/GeneralView/ConcentrateProject.jsx index 8d6eaec7..a3254837 100644 --- a/src/forge/users/GeneralView/ConcentrateProject.jsx +++ b/src/forge/users/GeneralView/ConcentrateProject.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { AlignAJBottom , AlignCenter } from '../../Component/layout'; +import { FlexAJ , AlignCenter } from '../../Component/layout'; import { Link } from 'react-router-dom'; import axios from 'axios'; @@ -22,7 +22,7 @@ function ConcentrateProject({userLogin,current}) { setList(p); if(p && p.length > 0){ let array = p.map(i=>{ - return i.id + return i.project_id }) setValue(array); } @@ -47,17 +47,17 @@ function ConcentrateProject({userLogin,current}) { { list && list.length>0 &&
- + 精选项目 { current && setVisible(true)}>自定义精选项目 } - +
    { list.map((i,k)=>{ return(
  • - {i.name} + {i.name}

    {i.description}

    { i.category && {i.category.name} } diff --git a/src/forge/users/GeneralView/Index.jsx b/src/forge/users/GeneralView/Index.jsx index c12f1510..47760da5 100644 --- a/src/forge/users/GeneralView/Index.jsx +++ b/src/forge/users/GeneralView/Index.jsx @@ -14,6 +14,7 @@ import ConcentrateProject from './ConcentrateProject'; import Activity from './Activity'; import moment from 'moment'; import Axios from 'axios'; +import Nodata from '../../Nodata'; const { Option } = Select; const aLimit = 5; @@ -22,7 +23,7 @@ function Index(props) { const [ total , setTotal ] = useState(0); const [ projectTrends , setProjectTrends ] = useState(undefined); - const [ year , setYear ] = useState("0"); + const [ year , setYear ] = useState(moment().get('year')); const [ yearList , setYearList ] = useState(undefined); const [ activityDate , setActivityDate ] = useState(undefined); @@ -100,21 +101,24 @@ function Index(props) {
- +

近期活动统计

+
- + 贡献度 - {setYear(e);setActivityDate(undefined)}}> { yearList && renderYear(yearList) } - +
+ +
动态 { projectTrends && projectTrends.length > 0 && } + { projectTrends && projectTrends.length === 0 && } { total > aLimit &&
setPage(p)}/>
}
diff --git a/src/forge/users/GeneralView/Index.scss b/src/forge/users/GeneralView/Index.scss index 9a909f66..30152fdc 100644 --- a/src/forge/users/GeneralView/Index.scss +++ b/src/forge/users/GeneralView/Index.scss @@ -1,17 +1,16 @@ .concentrate{ - padding:20px 30px; + padding:20px 0px 0px; .concentrateUl{ display: flex; flex-wrap: wrap; - margin-top: 15px; li{ width: 48.5%; margin-right: 3%; - margin-bottom: 20px; + margin-top: 20px; display: flex; flex-direction: column; justify-content: flex-start; - background-color: #fafafa; + border:1px solid #dedede; padding:15px 20px; cursor: default ; &:nth-child(2n){ @@ -46,7 +45,7 @@ } } .ConcentrateTip{ - margin:20px 30px; + margin:0px 30px; padding:5px 20px; border:1px solid rgb(248, 56, 56); border-radius: 4px; @@ -65,6 +64,21 @@ .ConcentrateBox{ .ant-modal-body{ min-height: 258px; + padding:0px; + padding-bottom: 15px; + } + .listbox{ + max-height: 210px; + overflow-y: auto; + padding-left: 30px; + } + .operateDiv{ + padding:20px 30px + } + .morelist{ + text-align: center; + padding-top:15px; + cursor: pointer; } .ant-checkbox-group{ display: flex; @@ -85,12 +99,10 @@ } } } - .recentStatic{ - padding-bottom: 30px; + padding: 30px 0px; } .calendarStatic,.activeStatic{ - padding:0px 30px; .infosActivity{ padding-bottom: 30px; &>li{ @@ -128,4 +140,7 @@ } } } +} +.activeStatic{ + padding-top: 20px; } \ No newline at end of file diff --git a/src/forge/users/Index.scss b/src/forge/users/Index.scss index 7dba18e7..bb49baa6 100644 --- a/src/forge/users/Index.scss +++ b/src/forge/users/Index.scss @@ -24,6 +24,15 @@ $flex:flex; margin-right: -1px; } } + +.echartBox{ + border:1px solid #DEDEDE; + &>p{ + color: #999; + padding:15px 20px; + text-align: center; + } +} .contentBox{ padding:20px 30px 0px 30px; & > div{ @@ -139,15 +148,20 @@ ul.ant-menu.menuStyle{ } .infosRightMenu{ - padding:0px 10px; .ant-menu-item{ padding:0px; margin:0px 20px!important; font-size: 17px; - height: 60px; - line-height: 60px; + height: 32px; + line-height: 0px; border-bottom: 2px solid transparent!important; position: relative; + a{ + & >i{ + font-size: 15px!important; + margin-right: 8px; + } + } .menuNum{ font-size: 12px; margin-left: 3px; @@ -155,8 +169,8 @@ ul.ant-menu.menuStyle{ } &.ant-menu-item-selected::before{ position: absolute; - width: 16px; - bottom: 7px; + width: 100%; + bottom: -1px; height: 2px; left: 0px; background-color: #1890ff; diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index 24c25f8f..ec8f7bf1 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -71,17 +71,21 @@ class Infos extends Component { renderPath=(pathname)=>{ const { username } = this.props.match.params; if(pathname === `/users/${username}`){ - this.setState({menuKey:"0"}); + this.setState({menuKey:"0",route_type:undefined}); }else if(pathname === `/users/${username}/statistics`){ - this.setState({menuKey:"1"}); + this.setState({menuKey:"1",route_type:undefined}); }else if(pathname.indexOf(`/users/${username}/projects`)>-1){ - this.setState({menuKey:"2"}); + this.setState({menuKey:"2",route_type:undefined}); }else if(pathname === `/users/${username}/notice`){ - this.setState({menuKey:"3"}); + this.setState({menuKey:"3",route_type:undefined}); }else if(pathname.indexOf(`/users/${username}/devops`)>-1){ - this.setState({menuKey:"4"}); + this.setState({menuKey:"4",route_type:undefined}); }else if(pathname === `/users/${username}/organizes`){ - this.setState({menuKey:"5"}); + this.setState({menuKey:"5",route_type:undefined}); + }else if(pathname === `/users/${username}/watchers`){ + this.setState({menuKey:undefined,route_type:"watchers"}); + }else if(pathname === `/users/${username}/fan_users`){ + this.setState({menuKey:undefined,route_type:"fan_users"}); } } @@ -262,103 +266,26 @@ class Infos extends Component {
- {/*
-
-
  • -

    this.undo_link()}> - - - 待办事项 - - - {undo_events} - -

    -
  • -
    -
    - -
    -
      -
    • this.change_project_type(undefined)}> - - 项目类型 - -
    • -
    • this.change_project_type("common")}> -

      - 开源托管项目 - - {user && user.common_projects_count} - -

      -
    • -
    • this.change_project_type("mirror")}> -

      - 开源镜像项目 - - {user && user.mirror_projects_count} - -

      -
    • -
    • this.change_project_type("sync_mirror")}> -

      - 镜像托管项目 - - {user && user.sync_mirror_projects_count} - -

      -
    • -
    -
    - -
    -
      -
    • - - DevOps工作流 - -
    • -
    • this.change_devops_type("CIService")}> -

      - CI服务 -

      -
    • -
    -
    -
    -
    -
  • -

    this.organize_link()} > - - - 组织 - - - {user && user.user_org_count} - -

    -
  • -
    -
    */}
    - - 概览 - 数据统计 - 项目 - { - current_user && user && user.login === current_user.login ? - 待办事项({undo_events}) - :"" - } - { - current_user && current_user.login && current_user.login === username ? - DevOps工作流 - :"" - } - 组织({user && user.user_org_count}) - + { !route_type && + + 概览 + 数据统计 + 项目 + { + current_user && user && user.login === current_user.login ? + 待办事项({undo_events}) + :"" + } + { + current_user && current_user.login && current_user.login === username ? + DevOps工作流 + :"" + } + 组织({user && user.user_org_count}) + + } {user && ( { if(result && result.data){ @@ -120,7 +122,7 @@ function Index(props) { return(
    - + 开发能力 - - { - topThree && -
    - - - -
    - } - { - percentData && -
    -
    - { - percentData.map((i,k)=>{ - return( - - ) - }) - } +
    +

    从五个维度刻画你的开发能力:语言能力、影响力、贡献度、活跃度、项目经验,同时可以查看社区平均数据。

    + + { + topThree && topThree.length > 0 && +
    + + +
    -
    - { - percentData.map((i,k)=>{ - return( - - {i.name} - {`${i.p}%`} - - ) - }) - } + } + { + percentData && +
    +
    + { + percentData.map((i,k)=>{ + return( + + ) + }) + } +
    +
    + { + percentData.map((i,k)=>{ + return( + + {i.name} + {`${i.p}%`} + + ) + }) + } +
    -
    - } + } +
    - + 角色定位 - +
    +

    根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理者、开发者、测试者、文档工作者等。

    + +
    - + 专业定位 - +
    +

    展示你擅长、关注、感兴趣的专业范围,通过你参与项目、收藏项目、关注项目、复刻项目等数据来统计。

    + +
    ) diff --git a/src/forge/users/Statistics/Index.scss b/src/forge/users/Statistics/Index.scss index a2f944b9..4ea048bf 100644 --- a/src/forge/users/Statistics/Index.scss +++ b/src/forge/users/Statistics/Index.scss @@ -1,5 +1,5 @@ .boxes{ - padding:20px 30px; + padding:15px 0px; .roundBox{ margin:20px auto; display: flex; diff --git a/src/forge/users/common_lists.js b/src/forge/users/common_lists.js index 5e238333..2bd45b32 100644 --- a/src/forge/users/common_lists.js +++ b/src/forge/users/common_lists.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import { Input, Spin, Pagination } from "antd"; - +import { Link } from 'react-router-dom'; import axios from "axios"; import Nodata from "../Nodata"; import UserList from "../UsersList/user_list"; @@ -87,7 +87,7 @@ class CommonList extends Component {
    -

    {userType === "watchers" ? `${title_type}关注的` : `关注${title_type}的`}

    +

    {userType === "watch_users" ? `${title_type}关注的` : `关注${title_type}的`}

    0 ? (
    - +
    ) : ( diff --git a/src/forge/users/new_user.css b/src/forge/users/new_user.css index 27898ae0..12e58dc5 100644 --- a/src/forge/users/new_user.css +++ b/src/forge/users/new_user.css @@ -10,7 +10,7 @@ } .list-left{ width: 26%; - padding-right: 20px; + padding-right: 30px; box-sizing: border-box; margin-bottom: 20px; } @@ -22,7 +22,7 @@ width:74%; background: #fff; padding:0px !important; - border:1px solid #eee; + border:none!important; } .text-center{text-align: center;}