Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
f8655d5826 | |
|
847cedd9bc |
File diff suppressed because it is too large
Load Diff
|
@ -187,7 +187,7 @@
|
|||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"proxy": "http://localhost:3001",
|
||||
"proxy": "http://localhost:3000",
|
||||
"port": "3007",
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "7.0.0-beta.51",
|
||||
|
|
|
@ -82,11 +82,23 @@ function CoderDepot(props){
|
|||
const { bannerList } = props;
|
||||
|
||||
|
||||
|
||||
// const [ badges , setBadges] = useState(undefined);
|
||||
// //按照后端返回的数据格式创建的临时数据 后续改为axios
|
||||
// function getBadgeData() {
|
||||
// axios.get(`/${owner}/${projectsId}/badge.json`)
|
||||
// .then(result => {
|
||||
// if(result) {
|
||||
// setBadges(result)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// test data
|
||||
const badges = {badge:[{ "login": "many_stars", "image_url": "https://www.gitlink.org.cn/system/lets/letter_avatars/2/J/236_194_58/120.png", "description": "test description1"}, {"login": "many_stars", "image_url": "https://www.gitlink.org.cn/system/lets/letter_avatars/2/X/181_166_38/120.png", "description": "test description2"}], total_count: 3}
|
||||
console.log(badges.badge)
|
||||
console.log(badges.total_count)
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(bannerList && bannerList.length>0){
|
||||
let a = bannerList.filter(i=>i.menu_name === "pulls");
|
||||
|
@ -353,7 +365,6 @@ function CoderDepot(props){
|
|||
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin));
|
||||
|
||||
return(
|
||||
|
||||
<WhiteBack>
|
||||
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
|
||||
<Spin spinning={isSpin}>
|
||||
|
@ -377,8 +388,7 @@ function CoderDepot(props){
|
|||
</React.Fragment>
|
||||
}
|
||||
<div style={{minHeight:"500px"}}>
|
||||
{
|
||||
|
||||
{
|
||||
projectDetail &&
|
||||
<Box className="Panels">
|
||||
<LongWidth>
|
||||
|
@ -559,19 +569,11 @@ function CoderDepot(props){
|
|||
<Invite code={inviteCode}/>
|
||||
</div>
|
||||
}
|
||||
{/*{*/}
|
||||
{/* inviteCode &&*/}
|
||||
{/* <div>*/}
|
||||
{/* <Badge code={inviteCode}/>*/}
|
||||
{/* </div>*/}
|
||||
{/*}*/}
|
||||
|
||||
{/* 徽章 */}
|
||||
{
|
||||
badges && badges.total_count >0 &&
|
||||
<Badge badges={badges} owner={owner} />
|
||||
}
|
||||
|
||||
{
|
||||
lesson_url &&
|
||||
<div>
|
||||
|
|
|
@ -200,26 +200,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.attrBadge{
|
||||
padding-top: 12px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 2px;
|
||||
a{
|
||||
margin: 0px 17px 10px 0px;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
&:nth-child(5n){
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.progress{
|
||||
display: flex;
|
||||
border-radius: 2px;
|
||||
|
@ -528,4 +508,22 @@
|
|||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.attrBadge{
|
||||
padding-top: 12px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 2px;
|
||||
a{
|
||||
margin: 0px 17px 10px 0px;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
&:nth-child(5n){
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ import { AlignCenter , FlexAJ } from '/home/gitlink/forgeplus/public/react/forg
|
|||
import { Link } from 'react-router-dom';
|
||||
import { Popover , Spin , Button } from 'antd';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import '/home/gitlink/forgeplus/public/react/forgeplus-react/src/forge/Component/Component.scss';
|
||||
import '../../Component/Component.scss';
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -260,25 +260,6 @@ ul.ant-menu.menuStyle{
|
|||
}
|
||||
|
||||
|
||||
.attrBadge{
|
||||
padding-top: 12px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 2px;
|
||||
a{
|
||||
margin: 0px 17px 10px 0px;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
&:nth-child(5n){
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.infoCount{
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
|
@ -290,8 +271,4 @@ ul.ant-menu.menuStyle{
|
|||
border-radius: 12px;
|
||||
margin-left: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Button, Spin , Menu, Popover } from "antd";
|
||||
import { Button, Spin , Menu } from "antd";
|
||||
import FocusButton from "../UsersList/focus_button";
|
||||
|
||||
import axios from "axios";
|
||||
|
@ -15,6 +15,17 @@ import Loadable from "react-loadable";
|
|||
import Loading from "../../Loading";
|
||||
import Badge from "../Main/sub/Badge";
|
||||
|
||||
|
||||
//const [ badges , setBadges] = useState(undefined);
|
||||
// 按照后端返回的数据格式创建的临时数据 后续改为axios
|
||||
// function getBadgeData() {
|
||||
// axios.get(`/${username}/statistics/badge.json`)
|
||||
// .then(result => {
|
||||
// if(result) {
|
||||
// setBadges(result)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//test data
|
||||
const badges = {badge:[{ "login": "many_stars", "image_url": "https://testforgeplus.trustie.net//system/lets/letter_avatars/2/G/178_217_57/120.png", "description": "test description1"}, {"login": "many_stars", "image_url": "https://testforgeplus.trustie.net//images/avatars/User/36480?t=1686645429", "description": "test description2"}], total_count: 3}
|
||||
|
||||
|
@ -74,7 +85,6 @@ class Infos extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
renderPath=(pathname)=>{
|
||||
const { username } = this.props.match.params;
|
||||
if(pathname === `/${username}`){
|
||||
|
@ -135,9 +145,7 @@ class Infos extends Component {
|
|||
this.setState({
|
||||
user: result.data,
|
||||
isSpin: false,
|
||||
undo_events:e,
|
||||
//测试数据
|
||||
badges : {badge:[1, 2, 3], total_count: 3}
|
||||
undo_events:e
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
|
@ -201,7 +209,7 @@ class Infos extends Component {
|
|||
render() {
|
||||
const { current_user } = this.props;
|
||||
const { username } = this.props.match.params;
|
||||
const { user, isSpin, route_type , undo_events , menuKey} = this.state;
|
||||
const { user, isSpin, route_type , undo_events , menuKey } = this.state;
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Spin spinning={isSpin}>
|
||||
|
@ -282,34 +290,12 @@ class Infos extends Component {
|
|||
</div>
|
||||
:""
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{/* 徽章 */}
|
||||
{
|
||||
badges && badges.total_count >0 &&
|
||||
<Badge badges={badges} />
|
||||
}
|
||||
{/*{*/}
|
||||
{/* badges && badges.total_count >0 &&*/}
|
||||
{/* <div className="list-l-Menu text-center">*/}
|
||||
{/* {*/}
|
||||
{/* badges.total_count > 0 ? owner={owner} projectsId={projectsId} */}
|
||||
{/* badges.badge.map((item,key)=>{*/}
|
||||
{/* return(*/}
|
||||
{/* <Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">*/}
|
||||
{/* <div>*/}
|
||||
{/* <span>{item}</span>*/}
|
||||
{/* <img src={getImageUrl(`/${item.image_url}`)} />*/}
|
||||
{/* </div>*/}
|
||||
{/* </Popover>*/}
|
||||
{/* )*/}
|
||||
{/* })*/}
|
||||
{/* :""*/}
|
||||
{/* }*/}
|
||||
{/* </div>*/}
|
||||
|
||||
{/*}*/}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue