背景色

This commit is contained in:
caishi 2021-03-19 11:35:03 +08:00
parent c3eb6edddc
commit d16ee801ec
22 changed files with 156 additions and 51 deletions

View File

@ -67,15 +67,14 @@ function Index(props){
} }
return( return(
<div className="aboutPanels"> <div className="aboutPanels">
<div className="aboutContent"> <div className="aboutContent">
<AlignCenterBetween style={{padding:"14px 0px"}}> <AlignCenterBetween style={{padding:"14px 20px"}}>
<span className="font-16"><i className="iconfont icon-xiangmujianjie mr5 font-16 color-blue"></i>项目简介</span> <span className="font-16"><i className="iconfont icon-xiangmujianjie mr5 font-16 color-blue"></i>项目简介</span>
{ editOpration && !edit && <a onClick={editContent} className="color-blue">编辑</a> } { editOpration && !edit && <a onClick={editContent} className="color-blue">编辑</a> }
</AlignCenterBetween> </AlignCenterBetween>
{ {
edit ? edit ?
<div> <div className="padding20">
<MDEditor <MDEditor
placeholder={"请输入描述信息"} placeholder={"请输入描述信息"}
height={500} height={500}
@ -114,7 +113,7 @@ function Index(props){
</div> </div>
</div> </div>
: :
<div style={{padding:"20px 0px"}}> <div className="padding20">
{content ? {content ?
<RenderHtml className="break_word_comments imageLayerParent" value={content} url={props.history.location}/> <RenderHtml className="break_word_comments imageLayerParent" value={content} url={props.history.location}/>
: :

View File

@ -4,7 +4,6 @@
.aboutContent{ .aboutContent{
border-radius: 2px; border-radius: 2px;
border: 1px solid #EEEEEE; border: 1px solid #EEEEEE;
padding:0px 30px;
width:100%; width:100%;
background-color: #fff; background-color: #fff;
margin-top:20px; margin-top:20px;

View File

@ -3,12 +3,12 @@ import { AlignCenter , FlexAJ } from '../Component/layout';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { getImageUrl } from 'educoder'; import { getImageUrl } from 'educoder';
function Contributors({contributors}){ function Contributors({contributors,owner,projectsId}){
return( return(
<div> <div>
<FlexAJ> <FlexAJ>
<AlignCenter><span className="font-16 color-grey-6">贡献者</span>{ contributors && contributors.total_count > 0 && <span className="infoCount">{contributors.total_count}</span>}</AlignCenter> <AlignCenter><span className="font-16 color-grey-6">贡献者</span>{ contributors && contributors.total_count > 0 && <span className="infoCount">{contributors.total_count}</span>}</AlignCenter>
<Link className="font-12 color-grey-9" to={``}>全部</Link> <Link className="font-12 color-grey-9" to={`/projects/${owner}/${projectsId}/contribute`}>全部</Link>
</FlexAJ> </FlexAJ>
<div className="attrPerson"> <div className="attrPerson">
{ {

View File

@ -31,10 +31,11 @@ export const AlignTop = styled.div`{
// //
export const Box = styled.div`{ export const Box = styled.div`{
display:flex; display:flex;
align-item:flex-start; align-items:flex-start;
}` }`
export const LongWidth = styled.div`{ export const LongWidth = styled.div`{
flex:1; flex:1;
width:0;
border-radius:5px; border-radius:5px;
margin-bottom:30px; margin-bottom:30px;
}` }`

View File

@ -10,6 +10,7 @@
padding:60px 0px; padding:60px 0px;
} }
.disposePanel{ .disposePanel{
border:1px solid #eee;
.language{ .language{
display: flex; display: flex;
margin-bottom: 20px; margin-bottom: 20px;

View File

@ -352,7 +352,7 @@ function CoderDepot(props){
projectDetail && projectDetail.contributors && projectDetail && projectDetail.contributors &&
<React.Fragment> <React.Fragment>
<Divider /> <Divider />
<Contributors contributors={projectDetail && projectDetail.contributors}/> <Contributors contributors={projectDetail && projectDetail.contributors} owner={owner} projectsId={projectsId}/>
</React.Fragment> </React.Fragment>
} }
{/* 语言 */} {/* 语言 */}

View File

@ -96,6 +96,10 @@ const ForkUsers = Loadable({
loader: () => import('../UsersList/fork_users'), loader: () => import('../UsersList/fork_users'),
loading: Loading, loading: Loading,
}) })
const Contribute = Loadable({
loader: () => import('./sub/Contribute'),
loading: Loading,
})
const CoderRootCommit = Loadable({ const CoderRootCommit = Loadable({
loader: () => import('./CoderRootCommit'), loader: () => import('./CoderRootCommit'),
@ -657,6 +661,7 @@ class Detail extends Component {
(props) => (<OrderIndex {...this.props} {...props} {...this.state} {...common} />) (props) => (<OrderIndex {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
{/* 新建合并请求 */}
<Route path="/projects/:owner/:projectsId/pulls/new" <Route path="/projects/:owner/:projectsId/pulls/new"
render={ render={
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />) (props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
@ -698,7 +703,12 @@ class Detail extends Component {
(props) => (<ForkUsers {...this.props} {...props} {...this.state} {...common} />) (props) => (<ForkUsers {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
{/* 贡献者列表 */}
<Route path="/projects/:owner/:projectsId/contribute"
render={
() => (<Contribute {...this.props} {...this.state} {...common} />)
}
></Route>
{/* 代码库----详情页面 */} {/* 代码库----详情页面 */}
<Route path="/projects/:owner/:projectsId/commits/branch/:branchName" <Route path="/projects/:owner/:projectsId/commits/branch/:branchName"

View File

@ -10,6 +10,7 @@
width: 220px; width: 220px;
margin-right: 25px; margin-right: 25px;
cursor: pointer; cursor: pointer;
border: 1px solid #eee;
&:last-child{ &:last-child{
margin-right: 0px; margin-right: 0px;
} }

View File

@ -18,10 +18,17 @@
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 20px; margin-bottom: 20px;
} }
.list-left > div{
border:1px solid #eee;
}
.list-left > div.bgcF{
border:none;
}
.list-right{ .list-right{
width:74%; width:74%;
background: #fff; background: #fff;
padding:10px; padding:10px;
border:1px solid #eee;
} }

View File

@ -0,0 +1,80 @@
import React, { useEffect, useState } from 'react';
import { WhiteBack , AlignCenter } from '../../Component/layout';
import "./sub.scss";
import axios from 'axios';
import { Pagination , Spin } from 'antd';
import NoData from '../../Nodata';
import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
function Contribute(props){
const [ list , setList ] = useState(undefined);
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
const [ isSpin , setIsSpin ] = useState(true);
const owner = props.match.params.owner;
const projectsId = props.match.params.projectsId;
const LIMIT = 20;
useEffect(()=>{
if(owner && projectsId){
getData();
}
},[owner,projectsId,page]);
function getData(){
setIsSpin(true);
const url = `/${owner}/${projectsId}/contributors.json`;
axios.get(url,{
params:{
limit:LIMIT,page,
}
}).then(result=>{
if(result){
setList(result.data.contributors);
setTotal(result.data.total_count);
setIsSpin(false);
}
}).catch(error=>{})
}
return(
<WhiteBack>
<Spin spinning={isSpin}>
<div className="boxPanel">
<p className="font-18 mb20">贡献者列表</p>
{
list && list.length > 0 ?
<div className="contrbuteList">
{
list.map((item,key)=>{
return(
<AlignCenter>
<img alt="" style={{borderRadius:"50%",marginRight:"10px"}} src={getImageUrl(`images/${item.image_url}`)} width="50px" height="50px"/>
<div>
<Link to={`/users/${item.login}`} className="font-16">{item.name}</Link>
<p className="font-12 color-grey-9">提交{item.contributions}</p>
</div>
</AlignCenter>
)
})
}
</div>
:""
}
{
list && list.length === 0 ? <NoData _html="暂无贡献者" />:""
}
{
total > LIMIT ?
<div className="mt20 edu-txt-center">
<Pagination simple pageSize={LIMIT} onChange={(p)=>{setPage(p)}} current={page} total={total}/>
</div>
:""
}
</div>
</Spin>
</WhiteBack>
)
}
export default Contribute;

View File

@ -0,0 +1,14 @@
.boxPanel{
width: 1200px;
margin:0px auto;
padding:20px 0px;
min-height: 500px;
.contrbuteList{
display: flex;
flex-wrap: wrap;
& > div{
width: 20%;
}
align-items: flex-start;
}
}

View File

@ -551,6 +551,7 @@ a.issue-type-button.active:hover {
} }
.item-list-right { .item-list-right {
width: 74%; width: 74%;
border:1px solid #eee;
} }
.detail_edit_action { .detail_edit_action {
padding: 10px; padding: 10px;
@ -673,7 +674,11 @@ a.issue-type-button.active:hover {
} }
.display-in{ .display-in{
display: inherit; display: flex;
align-items: flex-start;
}
.issue-form-right{
border:1px solid #eee;
} }
.issue-form-right .ant-form-item{ .issue-form-right .ant-form-item{
margin-bottom: 8px !important; margin-bottom: 8px !important;

View File

@ -103,7 +103,7 @@ class Index extends Component {
</ul> </ul>
</Short> </Short>
<Long> <Long>
<Gap> <Gap className="list-r-Info">
<Switch {...this.props}> <Switch {...this.props}>
{/* 协作者 */} {/* 协作者 */}
<Route <Route

View File

@ -166,7 +166,7 @@ class Setting extends Component {
return ( return (
<div> <div>
<Spin spinning={loading}> <Spin spinning={loading}>
<WhiteBack style={{paddingBottom:"20px"}}> <WhiteBack>
<Title>基本设置</Title> <Title>基本设置</Title>
<Form className="baseForm"> <Form className="baseForm">
<Form.Item label="项目名称"> <Form.Item label="项目名称">

View File

@ -92,6 +92,7 @@
.dangerousBox{ .dangerousBox{
margin-top: 20px; margin-top: 20px;
padding:20px; padding:20px;
border-top: 1px solid #eee;
&>div{ &>div{
border:1px solid #efc16b; border:1px solid #efc16b;
border-radius: 4px; border-radius: 4px;

View File

@ -85,9 +85,9 @@ class CommonUsers extends Component {
return ( return (
<div className="pbt15"> <div className="pbt15">
<div className="main background-f minH-670"> <div className="main background-f minH-670" style={{padding:"0px"}}>
<div className="plr-20 user-list-items"> <div className="user-list-items">
<div className="font-18 pb-10 border-b-line">{type_title}</div> <div className="font-18 padding10-20 border-b-line">{type_title}</div>
<Spin spinning={isSpin}> <Spin spinning={isSpin}>
<div className="w-100 inline-block"> <div className="w-100 inline-block">
{count === 0 ? ( {count === 0 ? (

View File

@ -119,9 +119,9 @@ class ForkUsers extends Component {
return ( return (
<div className="pbt15"> <div className="pbt15">
<div className="main background-f minH-670"> <div className="main background-f minH-670" style={{padding:"0px"}}>
<div className="plr-20 user-list-items"> <div className="user-list-items">
<div className="font-18 pb-10 border-b-line">Fork列表</div> <div className="font-18 padding10-20 border-b-line">Fork列表</div>
<Spin spinning={isSpin}> <Spin spinning={isSpin}>
<div className="w-100 inline-block" style={{minHeight:"400px"}}> <div className="w-100 inline-block" style={{minHeight:"400px"}}>
{users && users.length === 0 ? <NoneData _html="暂时还没有相关数据!" /> :"" } {users && users.length === 0 ? <NoneData _html="暂时还没有相关数据!" /> :"" }

View File

@ -1,10 +1,6 @@
.background-f { .background-f {
background: #fff; background: #fff;
} }
.newMain{background: transparent!important;}
/* .background-g {
background: #fafafa;
} */
.pt-15 { .pt-15 {
padding-top: 15px; padding-top: 15px;
} }

View File

@ -2,7 +2,7 @@ ul,ol,dl{
margin-bottom: 0px; margin-bottom: 0px;
} }
.newMain{ .newMain{
background-color: #f5f5f5; background-color: #fff;
} }
.color-black{ .color-black{
color: #333; color: #333;
@ -13,6 +13,7 @@ ul,ol,dl{
margin:20px auto; margin:20px auto;
background: #fff; background: #fff;
border-radius: 2px; border-radius: 2px;
border:1px solid #eee;
} }
.radius-2{ .radius-2{
border-radius: 2px; border-radius: 2px;
@ -162,10 +163,16 @@ form{
margin-top:8px; margin-top:8px;
} }
} }
.list-r-Info{
& > div{
box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
}
}
.list-l-Menu{ .list-l-Menu{
margin-bottom: 12px; margin-bottom: 12px;
border-radius:2px; border-radius:2px;
background-color: #fff; background-color: #fff;
box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
&>li{ &>li{
font-size: 1rem; font-size: 1rem;
padding:0px 0px 0px 20px; padding:0px 0px 0px 20px;

View File

@ -145,7 +145,7 @@ class Infos extends Component {
<div className="newMain clearfix"> <div className="newMain clearfix">
<Spin spinning={isSpin}> <Spin spinning={isSpin}>
<div className="new-content-flex"> <div className="new-content-flex">
<div className="list-left"> <div className="list-left" style={{border:"none"}}>
<div className="bgcF"> <div className="bgcF">
<div className="list-l-Menu text-center pd20 "> <div className="list-l-Menu text-center pd20 ">
<Avatar <Avatar

View File

@ -19,15 +19,6 @@ export function CNotificationHOC(options = {}) {
} }
showNotification = (description, message = "提示", icon) => { showNotification = (description, message = "提示", icon) => {
// const data = {
// message,
// description
// }
// if (icon) {
// data.icon = icon;
// }
// notification.open(data);
notification.open({ notification.open({
message:message, message:message,
description: description, description: description,
@ -146,23 +137,16 @@ export function CNotificationHOC(options = {}) {
return ( return (
<React.Fragment> <React.Fragment>
<style>
{`
.confirmModal .task-popup-content {
padding: 0px;
}
`}
</style>
<Modals <Modals
className="confirmModal" className="confirmModal"
modalsType={dialogOpen} modalsType={dialogOpen}
modalsTopval={ modalsTopval={
content content
} }
modalsBottomval={ subContent || "" } modalsBottomval={ subContent || "" }
modalCancel={this.handleDialogClose} modalCancel={this.handleDialogClose}
modalSave={this.onDialogOkBtnClick} modalSave={this.onDialogOkBtnClick}
okText={this.okText} okText={this.okText}
> >
</Modals> </Modals>
<Modals <Modals

View File

@ -583,7 +583,7 @@ span.CodeMirror-selectedtext {
body #root { body #root {
background: #f5f5f5; background: #fff;
} }
.newedu-class-leftnav { .newedu-class-leftnav {