背景色

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(
<div className="aboutPanels">
<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>
{ editOpration && !edit && <a onClick={editContent} className="color-blue">编辑</a> }
</AlignCenterBetween>
{
edit ?
<div>
<div className="padding20">
<MDEditor
placeholder={"请输入描述信息"}
height={500}
@ -114,7 +113,7 @@ function Index(props){
</div>
</div>
:
<div style={{padding:"20px 0px"}}>
<div className="padding20">
{content ?
<RenderHtml className="break_word_comments imageLayerParent" value={content} url={props.history.location}/>
:

View File

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

View File

@ -3,12 +3,12 @@ import { AlignCenter , FlexAJ } from '../Component/layout';
import { Link } from 'react-router-dom';
import { getImageUrl } from 'educoder';
function Contributors({contributors}){
function Contributors({contributors,owner,projectsId}){
return(
<div>
<FlexAJ>
<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>
<div className="attrPerson">
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,10 +18,17 @@
box-sizing: border-box;
margin-bottom: 20px;
}
.list-left > div{
border:1px solid #eee;
}
.list-left > div.bgcF{
border:none;
}
.list-right{
width:74%;
background: #fff;
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 {
width: 74%;
border:1px solid #eee;
}
.detail_edit_action {
padding: 10px;
@ -673,7 +674,11 @@ a.issue-type-button.active:hover {
}
.display-in{
display: inherit;
display: flex;
align-items: flex-start;
}
.issue-form-right{
border:1px solid #eee;
}
.issue-form-right .ant-form-item{
margin-bottom: 8px !important;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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