forked from Gitlink/forgeplus-react
Compare commits
74 Commits
master
...
develop_ed
Author | SHA1 | Date |
---|---|---|
|
d4550d44e9 | |
|
0138eb2f1e | |
|
e1aef30b9d | |
|
277ba72f91 | |
|
6a58a468f9 | |
|
14486724fa | |
|
3201b7265b | |
|
f774ce974d | |
|
fdca717eeb | |
|
4b304ead34 | |
|
67d914ddb6 | |
|
e6020c3e13 | |
|
af2feeb34f | |
|
40918bf1d7 | |
|
8a5a7a0647 | |
|
93ba9c6a98 | |
|
12322f8785 | |
|
8c1bebcfdc | |
|
04bdbd7c30 | |
|
f57ee7fd99 | |
|
1e0f522f4a | |
|
798d919447 | |
|
1f6a4bda6c | |
|
0d546f4789 | |
|
44996b5dea | |
|
134d79faa3 | |
|
2677efec83 | |
|
7482d1184c | |
|
58fb71b324 | |
|
5517b28062 | |
|
0bd7f7d900 | |
|
9cfe2c186e | |
|
e4c54622b8 | |
|
21902543f4 | |
|
e541e91a06 | |
|
b6dc01b0be | |
|
f0858e7ecc | |
|
f9f79e0365 | |
|
8903363695 | |
|
b9a8becec3 | |
|
2fcd2fd066 | |
|
898ad15343 | |
|
1cf7655e63 | |
|
2383710c54 | |
|
3b3d6dc8b1 | |
|
c74c40b73e | |
|
c5bbcd9c1d | |
|
74deb640a9 | |
|
534da2115a | |
|
f2ef3183ea | |
|
1182a45cdc | |
|
29f37b9760 | |
|
f5fa45e1ce | |
|
97bf4a5a46 | |
|
5e4d3a92a1 | |
|
29f25a585d | |
|
6bd57d8877 | |
|
e7aa871b53 | |
|
9c22457249 | |
|
68b1296652 | |
|
0f7c8a4b5d | |
|
98289b05aa | |
|
83086e7d61 | |
|
76c88a659a | |
|
ae8ece2695 | |
|
93994cb785 | |
|
917958c880 | |
|
65b906f49f | |
|
90be5ad793 | |
|
eeaefc5810 | |
|
284bf67f82 | |
|
fbdde52651 | |
|
64dcdce51b | |
|
741a461f7e |
|
@ -48,55 +48,6 @@
|
|||
font-size: 16px
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li a {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li a:hover {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li:last-child {
|
||||
margin-right: 0px
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active a {
|
||||
color: #459be5 !important;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active p {
|
||||
color: #459be5 !important;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li p:hover {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li p {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active div ul li a {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active div ul li a:hover {
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active ul li a {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active ul li a:hover {
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active:after {
|
||||
content: '';
|
||||
|
@ -341,10 +292,6 @@ em.vertical-line {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
/*底部*/
|
||||
.newFooter {
|
||||
max-height: 110px;
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
|
|
|
@ -25,9 +25,6 @@ html {
|
|||
min-width: 1200px
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
max-height: 110px;
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
|
|
|
@ -2346,7 +2346,6 @@ input::-ms-clear {
|
|||
/*中间部分宽度固定为1200*/
|
||||
.newMain {
|
||||
margin: 0 auto;
|
||||
padding-bottom: 110px;
|
||||
min-width: 1200px;
|
||||
}
|
||||
|
||||
|
@ -4108,21 +4107,6 @@ em.vertical-line {
|
|||
|
||||
/* 右侧内容宽度变化的话,需要调整posi-search right的值*/
|
||||
|
||||
/*底部*/
|
||||
.newFooter {
|
||||
max-height: 110px;
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #323232;
|
||||
clear: both;
|
||||
min-width: 1200px;
|
||||
z-index: 8;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.footercon {
|
||||
border-bottom: 1px solid #47494d;
|
||||
|
|
|
@ -56,7 +56,7 @@ window._debugType = debugType;
|
|||
export function initAxiosInterceptors(props) {
|
||||
initOnlineOfflineListener();
|
||||
var proxy = "http://localhost:3000";
|
||||
proxy = "https://testforgeplus.trustie.net";
|
||||
proxy = "https://testforgeplus.educoder.net";
|
||||
|
||||
const requestMap = {};
|
||||
window.setfalseInRequestMap = function (keyName) {
|
||||
|
|
|
@ -15,7 +15,7 @@ export function getImageUrl(path) {
|
|||
if (isDev) {
|
||||
return `${local}/${path}`
|
||||
}
|
||||
return `/${path}`;
|
||||
return `${path}`;
|
||||
}
|
||||
|
||||
export function getImage(path) {
|
||||
|
@ -162,7 +162,7 @@ export function getmyUrl(geturl) {
|
|||
}
|
||||
|
||||
export function getUploadActionUrl(path, goTest) {
|
||||
return `${getUrl()}/api/attachments.json?debug=${window._debugType || 'admin'}`;
|
||||
return `${getUrl()}/api/attachments.json`;
|
||||
}
|
||||
|
||||
export function getUploadLogoActionUrl() {
|
||||
|
|
|
@ -64,7 +64,7 @@ function CommentItem({
|
|||
const commentAvatar = (author) => (
|
||||
<img
|
||||
className="item-flex flex-image"
|
||||
src={author.image_url ? getImageUrl(`images/${author.image_url}`) : 'https://b-ssl.duitang.com/uploads/item/201511/13/20151113110434_kyReJ.jpeg'}
|
||||
src={author.image_url ? getImageUrl(`/${author.image_url}`) : 'https://b-ssl.duitang.com/uploads/item/201511/13/20151113110434_kyReJ.jpeg'}
|
||||
alt=""
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -33,7 +33,7 @@ class ActivityItem extends Component {
|
|||
}
|
||||
<p className="itemLine mt10">
|
||||
<Link to={`/users/${item && item.user_login}`} className="show-user-link">
|
||||
<img alt="" src={getImageUrl(`images/${item.user_avatar}`)} className="createImage" />
|
||||
<img alt="" src={getImageUrl(`/${item.user_avatar}`)} className="createImage" />
|
||||
<span className="mr20">{item.user_name}</span>
|
||||
</Link>
|
||||
{item.created_at && <span className="color-grey-9">创建于<span className="ml2 color-grey-6">{item.created_at}</span></span>}
|
||||
|
|
|
@ -42,7 +42,7 @@ function AddMember({getID,login}){
|
|||
className="user_img radius"
|
||||
width="28"
|
||||
height="28"
|
||||
src={getImageUrl(`images/${item && item.image_url}`)}
|
||||
src={getImageUrl(`/${item && item.image_url}`)}
|
||||
alt=""
|
||||
/>
|
||||
<span className="ml10" style={{ "vertical-align": "middle" }}>
|
||||
|
|
|
@ -6,7 +6,7 @@ import './Component.scss';
|
|||
function Cards({img , title, desc , rightBtn , src}){
|
||||
return(
|
||||
<div className="cards">
|
||||
{img &&<div className="img"><img src={getImageUrl(`images/${img}`)} alt=""/></div>}
|
||||
{img &&<div className="img"><img src={getImageUrl(`/${img}`)} alt=""/></div>}
|
||||
<div className="content">
|
||||
<p className="titles">
|
||||
<Link to={src}>{title}</Link>
|
||||
|
|
|
@ -151,4 +151,42 @@ li.ant-menu-item{
|
|||
.ant-tree{
|
||||
margin:0px 20px!important;
|
||||
}
|
||||
}
|
||||
|
||||
.menuPanels{
|
||||
width: 240px;
|
||||
height: 180px;
|
||||
.ant-popover-content,.ant-popover-inner{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.halfs{
|
||||
margin-top: 24px;
|
||||
padding:24px 0px 0px 0px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
.attrPerson{
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
}
|
||||
.menuinfos{
|
||||
padding:15px 0px;
|
||||
&>a{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
border-right: 1px solid #eee;
|
||||
flex: 1;
|
||||
& >span:first-child{
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
}
|
||||
& >span:last-child{
|
||||
color: #666;
|
||||
}
|
||||
&:last-child{
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +1,154 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { AlignCenter , FlexAJ } from '../Component/layout';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Popover , Spin } from 'antd';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import './Component.scss';
|
||||
import { getUser } from '../GetData/getData';
|
||||
import axios from 'axios';
|
||||
|
||||
function Contributors({contributors,owner,projectsId}){
|
||||
const [ menuList ,setMenuList ]= useState([]);
|
||||
const [ list , setList ]= useState(undefined);
|
||||
const [ total , setTotal ]= useState(0);
|
||||
const [ menu , setMenu ] = useState("");
|
||||
const [ login , setLogin ] = useState(undefined);
|
||||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
if(contributors && contributors.total_count>0){
|
||||
setTotal(contributors.total_count);
|
||||
setList(contributors.list);
|
||||
}
|
||||
},[contributors])
|
||||
|
||||
useEffect(()=>{
|
||||
if(login){
|
||||
getUsers(login);
|
||||
}else{
|
||||
setMenu(undefined);
|
||||
}
|
||||
},[login])
|
||||
|
||||
async function getUsers(login){
|
||||
setIsSpin(true);
|
||||
let a = menuList && menuList.filter(i=>i.login === login);
|
||||
if(a.length === 0){
|
||||
let result = await getUser(login);
|
||||
let arr = menuList;
|
||||
arr.push({...result});
|
||||
setMenuList(arr);
|
||||
setMenusFunc(result);
|
||||
setIsSpin(false);
|
||||
}else{
|
||||
setMenusFunc(a[0]);
|
||||
setIsSpin(false);
|
||||
}
|
||||
}
|
||||
|
||||
function setMenusFunc(data){
|
||||
if(data){
|
||||
let ele = (
|
||||
<Spin spinning={isSpin}>
|
||||
<FlexAJ>
|
||||
<AlignCenter>
|
||||
<Link to={`/users/${data.login}`}><img src={getImageUrl(`/${data.image_url}`)} alt="" className="radius" width="38px" height="38px"/></Link>
|
||||
<Link to={`/users/${data.login}`} className="ml10">{data.name}</Link>
|
||||
</AlignCenter>
|
||||
{
|
||||
data.is_watch ? <a className="color-grey-9" onClick={()=>FocusFunc(false,data.login)}>取消关注</a>:<a className="color-blue" onClick={()=>FocusFunc(true,data.login)}>关注</a>
|
||||
}
|
||||
</FlexAJ>
|
||||
<AlignCenter className="menuinfos">
|
||||
<a href={data.projects_url}>
|
||||
<span>{data.projects_count}</span>
|
||||
<span>项目数</span>
|
||||
</a>
|
||||
<a href={data.followers_url}>
|
||||
<span>{data.followers_count}</span>
|
||||
<span>粉丝数</span>
|
||||
</a>
|
||||
<a href={data.following_url}>
|
||||
<span>{data.following_count}</span>
|
||||
<span>关注数</span>
|
||||
</a>
|
||||
</AlignCenter>
|
||||
{
|
||||
data.organizations && data.organizations.length > 0 ?
|
||||
<AlignCenter className="font-12 pt4 pb4">
|
||||
<span>所属组织:</span>
|
||||
<div className="task-hide flex1">
|
||||
{renderArray(data.organizations)}
|
||||
</div>
|
||||
</AlignCenter>
|
||||
:""
|
||||
}
|
||||
{
|
||||
data.location && <AlignCenter className="font-12 pt4 pb4"><span>所在地址:</span><span className="ml5">{data.location}</span></AlignCenter>
|
||||
}
|
||||
</Spin>
|
||||
)
|
||||
setMenu(ele);
|
||||
}
|
||||
}
|
||||
|
||||
function FocusFunc(flag,login){
|
||||
axios({
|
||||
method: flag ? 'post' : 'delete',
|
||||
url: `/watchers/${flag ? 'follow' : 'unfollow'}.json`,
|
||||
params: {target_type: "user",id:login}
|
||||
}).then(result => {
|
||||
if (result && (result.data.status === 0 || result.data.status === 2)) {
|
||||
let a = menuList && menuList.filter(i=>i.login === login);
|
||||
if(a){
|
||||
a[0].is_watch = flag;
|
||||
}
|
||||
setMenusFunc(a[0]);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
function renderArray(array){
|
||||
let str = "";
|
||||
for(var i = 0;i<array.length;i++){
|
||||
str += array[i].name +"、";
|
||||
}
|
||||
let substr = str.substr(0,str.length-1);
|
||||
return (<span title={substr}>{substr}</span>)
|
||||
}
|
||||
|
||||
function setVisibleFunc(flag,l,index){
|
||||
if(l !== login){
|
||||
setLogin(l);
|
||||
}
|
||||
var lx = list.concat();
|
||||
lx.map(i=>i.visible =false);
|
||||
if(flag){
|
||||
lx[index].visible = flag;
|
||||
}
|
||||
lx.splice();
|
||||
setList(lx);
|
||||
}
|
||||
|
||||
return(
|
||||
<div>
|
||||
<div className="halfs">
|
||||
<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={`/projects/${owner}/${projectsId}/contribute`}>全部</Link>
|
||||
</FlexAJ>
|
||||
<div className="attrPerson">
|
||||
<div className="attrPerson" onMouseLeave={()=>setVisibleFunc(false)}>
|
||||
{
|
||||
contributors && contributors.total_count > 0 ?
|
||||
contributors.list.map((item,key)=>{
|
||||
total > 0 ?
|
||||
list.map((item,key)=>{
|
||||
return(
|
||||
<Link key={key} to={`/users/${item.login}`}><img src={getImageUrl(`images/${item.image_url}`)} alt=""/></Link>
|
||||
<Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">
|
||||
<Link key={key} to={`/users/${item.login}`}>
|
||||
<img src={getImageUrl(`/${item.image_url}`)} alt="" onMouseOver={()=>setVisibleFunc(true,item.login,key)}/>
|
||||
</Link>
|
||||
</Popover>
|
||||
)
|
||||
})
|
||||
:""
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.ant-modal-mask{
|
||||
z-index: 10000;
|
||||
}
|
||||
.ant-modal-wrap{
|
||||
z-index: 10001;
|
||||
.ant-form-explain{
|
||||
position: absolute;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
import React , {forwardRef, useEffect} from 'react';
|
||||
import { Modal , Form , Input , Button } from 'antd';
|
||||
import './EAccount.scss';
|
||||
|
||||
function EducoderAccount({form , visible , onOk , email}){
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
if(email){
|
||||
setFieldsValue({email})
|
||||
}
|
||||
},[email])
|
||||
|
||||
function onSure(){
|
||||
validateFields((error,values)=>{
|
||||
if(!error){
|
||||
onOk(values);
|
||||
}
|
||||
})
|
||||
}
|
||||
const layout = {
|
||||
labelCol: { span: 5 },
|
||||
wrapperCol: { span: 18 },
|
||||
};
|
||||
return(
|
||||
<Modal
|
||||
visible={visible}
|
||||
title="提示"
|
||||
width="500px"
|
||||
closable={false}
|
||||
footer={
|
||||
<Button type="primary" onClick={onSure}>确定</Button>
|
||||
}
|
||||
centered
|
||||
>
|
||||
<div>
|
||||
<p className="mb15 edu-txt-center" style={{maxWidth:"350px",margin:"0px auto"}}>
|
||||
{
|
||||
email ?
|
||||
`平台已检测到您已绑定邮箱${email},请您确认如下操作`
|
||||
:
|
||||
"平台已检测到您未绑定邮箱,为不影响使用协同开发功能,请先绑定邮箱"
|
||||
}
|
||||
</p>
|
||||
<Form {...layout}>
|
||||
<Form.Item label="邮箱">
|
||||
{getFieldDecorator("email",{
|
||||
rules:[{required:true,message:"请输入邮箱账号"}]
|
||||
})(
|
||||
<Input placeholder="请输入您的邮箱账号" width="220px" disabled={email}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="密码">
|
||||
{getFieldDecorator("password",{
|
||||
rules:[{required:true,message:"请输入您的平台密码"}]
|
||||
})(
|
||||
<Input.Password placeholder="请输入您的平台密码" width="220px"/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
export default Form.create()(forwardRef(EducoderAccount));
|
|
@ -45,7 +45,7 @@ const Div = styled.div`{
|
|||
export default (({ user , img, name, time, focusStatus, is_current_user, login , successFunc }) => {
|
||||
return (
|
||||
<Div>
|
||||
<Link to={`/users/${user && user.login}`}><Img src={getImageUrl(`images/${img}`)} /></Link>
|
||||
<Link to={`/users/${user && user.login}`}><Img src={getImageUrl(`/${img}`)} /></Link>
|
||||
<div className="m-infos">
|
||||
<Link to={`/users/${user && user.login}`}><Name>{name}</Name></Link>
|
||||
<Time><I className="iconfont icon-shijian"></I>加入时间:{time}</Time>
|
||||
|
|
|
@ -44,7 +44,7 @@ export default ({ getUser })=>{
|
|||
className="user_img radius"
|
||||
width="28"
|
||||
height="28"
|
||||
src={getImageUrl(`images/${item && item.image_url}`)}
|
||||
src={getImageUrl(`/${item && item.image_url}`)}
|
||||
alt=""
|
||||
/>
|
||||
<span className="ml10" style={{ "vertical-align": "middle" }}>
|
||||
|
|
|
@ -37,7 +37,7 @@ function About(props, ref) {
|
|||
const [ typeFlag, setTypeFlag] = useState(false);
|
||||
|
||||
|
||||
const AuthorLogin = props.author && props.author.login;
|
||||
const AuthorLogin = props.projectDetail && props.projectDetail.author && props.projectDetail.author.login;
|
||||
const CurrentLogin = props.current_user && props.current_user.login;
|
||||
useEffect(()=>{
|
||||
if(CurrentLogin === AuthorLogin){
|
||||
|
|
|
@ -12,7 +12,7 @@ function ServiceModal({sureModal}){
|
|||
<div className="mt30" style={{textAlign:"center"}}>
|
||||
<Radio.Group value={type} onChange={changeType}>
|
||||
<Radio value={1}>自有服务器</Radio>
|
||||
<Radio value={2}>Trustie服务器</Radio>
|
||||
<Radio value={2}>EduCoder服务器</Radio>
|
||||
</Radio.Group>
|
||||
<p className="mt30"><Button type="primary" onClick={()=>sureModal(type)}>下一步</Button></p>
|
||||
</div>
|
||||
|
|
|
@ -58,6 +58,7 @@ function Structure(props,ref){
|
|||
return {
|
||||
...item,
|
||||
author:item.author && item.author.name,
|
||||
image_url:item.author && item.author.image_url,
|
||||
message: {
|
||||
branch: item.branch_target,
|
||||
message: item.message,
|
||||
|
@ -244,7 +245,7 @@ function Structure(props,ref){
|
|||
{meg.sha && <span className="color-orange">{meg.sha}</span>}
|
||||
</div>
|
||||
<AlignCenter>
|
||||
<img style={{borderRadius:"50%",marginRight:"10px",width:"25px",height:"25px"}} src={`${current_user && getUrl(`/images/${current_user.image_url}`)}`} />
|
||||
<img style={{borderRadius:"50%",marginRight:"10px",width:"25px",height:"25px"}} alt="" src={`${item.image_url && getUrl(`/images/${item.image_url}`)}`} />
|
||||
<div className="task-hide ml5" style={{ maxWidth: "300px" }}>
|
||||
{meg.message}
|
||||
</div>
|
||||
|
|
|
@ -14,4 +14,8 @@ export const getHooks = async (id,params)=>{
|
|||
// 获取子目录列表
|
||||
export const getSubEntries = async (owner,projectsId,params)=>{
|
||||
return (await axios.get(`/${owner}/${projectsId}/sub_entries.json`,{params})).data;
|
||||
}
|
||||
// 获取用户信息
|
||||
export const getUser = async (login)=>{
|
||||
return (await axios.get(`/users/${login}/hovercard.json`)).data;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
import React, { useEffect , useState } from 'react';
|
||||
import './header.scss';
|
||||
|
||||
function Footer(){
|
||||
const [ value , setValue ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
try {
|
||||
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
||||
setValue(chromesettingArray.footer);
|
||||
} catch (e) {
|
||||
}
|
||||
},[])
|
||||
|
||||
function showhtml(htmlString){
|
||||
var html = {__html:htmlString};
|
||||
return <div dangerouslySetInnerHTML={html}></div> ;
|
||||
}
|
||||
|
||||
return(
|
||||
<div>
|
||||
<div style={{height:"483px"}}></div>
|
||||
<div className="newFooter edu-txt-center">
|
||||
{value && showhtml(value)}
|
||||
{/* <div className="footerInfos">
|
||||
<ul>
|
||||
<li>社区</li>
|
||||
<li><a href={`/`} target="_blank">网站首页</a></li>
|
||||
<li><a href={`https://www.trustie.net/agreement`} target="_blank">服务协议</a></li>
|
||||
<li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li>
|
||||
<li><a href={`https://forum.trustie.net/`} target="_blank">问吧交流</a></li>
|
||||
<li><a href={`https://www.trustie.net/cooperation`} target="_blank">合作伙伴</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>支持与服务</li>
|
||||
<li><a href={`https://forgeplus.trustie.net/docs/api`} target="_blank">API文档</a></li>
|
||||
<li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li>
|
||||
<li><a href={`https://git-scm.com`} target="_blank">Git常用命令</a></li>
|
||||
<li><a href={`https://forum.trustie.net/forums/3080/detail`} target="_blank">DevOps使用文档</a></li>
|
||||
<li><a href={`https://forgeplus.trustie.net/projects/jasder/forgeplus/tree/master/CHANGELOG.md`} target="_blank">日志更新</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>合作伙伴</li>
|
||||
<li><a href={`http://www.sei.pku.edu.cn`} target="_blank">北京大学</a></li>
|
||||
<li><a href={`http://scse.buaa.edu.cn`} target="_blank">北京航空航天大学</a></li>
|
||||
<li><a href={`https://www.nju.edu.cn`} target="_blank">南京大学</a></li>
|
||||
<li><a href={`https://www.xtu.edu.cn`} target="_blank">湘潭大学</a></li>
|
||||
<li><a href={`http://www.iscas.ac.cn`} target="_blank">ISCAS</a></li>
|
||||
<li><a href={`https://www.ucloud.cn`} target="_blank">UCloud优刻得</a></li>
|
||||
<li><a href={`http://www.inforbus.com`} target="_blank">中创软件</a></li>
|
||||
<li><a href={`https://www.inspur.com`} target="_blank">浪潮集团</a></li>
|
||||
<li><a href={`http://www.copu.org.cn`} target="_blank">中国开源软件推进联盟</a></li>
|
||||
<li><a href={`https://www.sjtu.edu.cn`} target="_blank">上海交通大学</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>合作伙伴</li>
|
||||
<li><span>热线:</span></li>
|
||||
<li><span>QQ群:1071514693</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p className="footerCopy">© Copyright 2007~2021 国防科技大学Trustie团队 & IntelliDE <a href="https://beian.miit.gov.cn">湘ICP备 17009477号</a></p> */}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Footer;
|
|
@ -104,14 +104,14 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
)
|
||||
}else{
|
||||
return <i className="iconfont icon-sousuo font-18 color-grey-6 ml30" onClick={() => {
|
||||
return <i className="iconfont icon-sousuo font-18 color-white ml30" onClick={() => {
|
||||
this.setState({openSearch:true})
|
||||
}} />
|
||||
}
|
||||
}
|
||||
|
||||
onGlobalSearch=(value,item)=>{
|
||||
window.location.href=`${item && item.url}?value=` + value;
|
||||
window.location.href=`${item}?value=` + value;
|
||||
}
|
||||
|
||||
openNotification = (messge) => {
|
||||
|
@ -577,8 +577,8 @@ class NewHeader extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
let search_url = settings && settings.common && settings.common.length> 0 && settings.common.filter(item=>item.name==="搜索");
|
||||
let notice_url = settings && settings.common && settings.common.length> 0 && settings.common.filter(item=>item.name==="通知");
|
||||
let search_url = settings && settings.common && settings.common.search;
|
||||
let notice_url = settings && settings.common && settings.common.notice;
|
||||
return (
|
||||
<div className="newHeaders" id="nHeader">
|
||||
<div className="headerContent">
|
||||
|
@ -600,14 +600,14 @@ class NewHeader extends Component {
|
|||
<GotoQQgroup {...this.state} {...this.props} setgoshowqqgtounp={(bool) => this.setgoshowqqgtounp(bool)}></GotoQQgroup>
|
||||
:""
|
||||
}
|
||||
<a href={settings && settings.new_course.default_url} className={"fl mr30"} style={{minWidth:"45px"}}>
|
||||
{
|
||||
settings && settings.nav_logo_url ?
|
||||
<img alt="可控开源社区" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(settings.nav_logo_url)}></img>
|
||||
:
|
||||
<img alt="可控开源社区" className="logoimg" style={{ heigth: "40px" }} src={logo}></img>
|
||||
}
|
||||
</a>
|
||||
{
|
||||
settings && settings.nav_logo_url ?
|
||||
<a href={settings && settings.new_course.default_url} className={"fl mr30"} style={{minWidth:"45px"}}>
|
||||
<img alt="可控开源社区" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(`/${settings.nav_logo_url}`)}></img>
|
||||
</a>
|
||||
:
|
||||
""
|
||||
}
|
||||
<div className="head-nav pr" id={"head-navpre1"}>
|
||||
{
|
||||
settings && settings.navbar && settings.navbar.length > 0 ?
|
||||
|
@ -646,19 +646,19 @@ class NewHeader extends Component {
|
|||
}
|
||||
</div>
|
||||
<div className="head-right">
|
||||
{search_url && search_url.length>0 ? this.SearchInput(openSearch,search_url[0]):""}
|
||||
{search_url ? this.SearchInput(openSearch,search_url):""}
|
||||
{
|
||||
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
||||
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
||||
<i className="iconfont icon-tianjiafangda color-grey-6 ml30"></i>
|
||||
<i className="iconfont icon-tianjiafangda color-white ml30"></i>
|
||||
</Dropdown>:""
|
||||
}
|
||||
|
||||
{this.props.user && this.props.user.login && (notice_url && notice_url.length>0) ?
|
||||
{this.props.user && this.props.user.login && notice_url ?
|
||||
<div className="ml30 edu-menu-panel">
|
||||
{user && user.login &&
|
||||
<a href={`${notice_url[0].url}`} style={{ position: 'relative' }}>
|
||||
<i className="iconfont icon-xiaoxilingdang color-grey-6"></i>
|
||||
<a href={`${notice_url}`} style={{ position: 'relative' }}>
|
||||
<i className="iconfont icon-xiaoxilingdang color-white"></i>
|
||||
<span className="newslight" style={{ display: this.props.Headertop === undefined ? "none" : this.props.Headertop.new_message === true ? "block" : "none" }}>
|
||||
</span>
|
||||
</a>
|
||||
|
@ -694,17 +694,16 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
{!user || (user && !user.login) ?
|
||||
<span className="font-15 ml30">
|
||||
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-6">登录</a>
|
||||
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
||||
{
|
||||
settings && settings.new_course && settings.new_course.register_url &&
|
||||
<span><em className="vertical-line"></em><a className="ml5 color-grey-6" href={`${settings.new_course.register_url}`} target="_blank">注册</a></span>
|
||||
settings && settings.common && settings.common.register &&
|
||||
<span><em className="vertical-line"></em><a className="ml5 color-white" href={`${settings.common.register}`} target="_blank">注册</a></span>
|
||||
}
|
||||
</span>
|
||||
:
|
||||
<div className="ml30 edu-menu-panel" style={{ height: "70px", lineHeight: "70px" }}>
|
||||
<a href={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}>
|
||||
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
|
||||
src={getImageUrl(`images/` + user.image_url)} width="34">
|
||||
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image" src={getImageUrl(`/${user.image_url}`)} width="34">
|
||||
</img>
|
||||
</a>
|
||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
||||
|
|
|
@ -7,4 +7,56 @@
|
|||
.ant-menu-vertical > .ant-menu-item{
|
||||
border:none
|
||||
}
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #323232;
|
||||
clear: both;
|
||||
min-width: 1200px;
|
||||
z-index: 8;
|
||||
left: 0px;
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom:0px !important;
|
||||
}
|
||||
.footerInfos{
|
||||
display: flex;
|
||||
max-width: 1200px;
|
||||
margin:0px auto;
|
||||
justify-content: space-around;
|
||||
padding:60px 0px;
|
||||
& >ul{
|
||||
padding:0px 40px;
|
||||
box-sizing: border-box;
|
||||
max-width: 25%;
|
||||
text-align: left;
|
||||
li{
|
||||
color: #fff;
|
||||
font-weight: 300;
|
||||
&:first-child{
|
||||
font-size: 17px;
|
||||
}
|
||||
&>a,&>span{
|
||||
color: #bbb;
|
||||
}
|
||||
&>a:hover{
|
||||
color: #4cacff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footerCopy{
|
||||
color: #bbb;
|
||||
border-top: 1px solid #4e4e4e;
|
||||
padding:10px 0px;
|
||||
a{
|
||||
color: #bbb;
|
||||
&:hover{
|
||||
color: #4cacff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ import { withRouter } from "react-router";
|
|||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||
import Handbook from './Component/Handbook';
|
||||
import "./css/index.scss";
|
||||
|
||||
import Loadable from "react-loadable";
|
||||
|
@ -35,7 +34,6 @@ class Index extends Component {
|
|||
render() {
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Handbook />
|
||||
<Switch {...this.props}>
|
||||
<Route
|
||||
path="/projects/:projectsType/new/:OIdentifier"
|
||||
|
|
|
@ -42,17 +42,18 @@ function CoderDepot(props){
|
|||
const [ openModal , setOpenModal ] = useState(false);
|
||||
const [ desc , setDesc ] = useState(undefined);
|
||||
const [ website , setWebsite ] = useState(undefined);
|
||||
const [ lesson_url , setLessonUrl ] = useState(undefined);
|
||||
|
||||
const owner = props.match.params.owner;
|
||||
const projectsId = props.match.params.projectsId;
|
||||
const branchName = props.match.params.branchName;
|
||||
let pathname = props.history.location.pathname;
|
||||
|
||||
useEffect(()=>{
|
||||
if(props.projectDetail){
|
||||
setProjectDetail(props.projectDetail);
|
||||
setDesc(props.projectDetail.description);
|
||||
setWebsite(props.projectDetail.website);
|
||||
setLessonUrl(props.projectDetail.lesson_url);
|
||||
}
|
||||
},[props])
|
||||
|
||||
|
@ -65,17 +66,17 @@ function CoderDepot(props){
|
|||
},[treeValue])
|
||||
|
||||
useEffect(()=>{
|
||||
if (pathname){
|
||||
if (pathname && projectDetail){
|
||||
if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${branchName}/`) > -1) {
|
||||
let url = pathname.split(`/tree/${branchName}/`)[1];
|
||||
setTreeValue(url);
|
||||
getFileInfo(url,branchName);
|
||||
}else{
|
||||
setTreeValue(undefined);
|
||||
getDirInfo(branchName ||(projectDetail && projectDetail.default_branch));
|
||||
getDirInfo(branchName ||projectDetail.default_branch);
|
||||
}
|
||||
}
|
||||
},[pathname])
|
||||
},[pathname,projectDetail])
|
||||
|
||||
// 获取主目录列表
|
||||
function getDirInfo(branch){
|
||||
|
@ -94,6 +95,7 @@ function CoderDepot(props){
|
|||
setLastCommit(c && c.commit);
|
||||
setLastCommitAuthor(c && (c.author || (c.commit && c.commit.author)));
|
||||
setMainFlag(true);
|
||||
setReadOnly(true);
|
||||
}
|
||||
setTimeout(function(){setIsSpin(false);},500);
|
||||
}).catch(error=>{setIsSpin(false);})
|
||||
|
@ -135,6 +137,7 @@ function CoderDepot(props){
|
|||
setLastCommit(c && c.commit);
|
||||
setLastCommitAuthor(c && (c.author || (c.commit && c.commit.author)));
|
||||
setMainFlag(false);
|
||||
setReadOnly(true);
|
||||
}
|
||||
setTimeout(function(){setIsSpin(false);},500)
|
||||
}).catch(error=>{setIsSpin(false);})
|
||||
|
@ -214,20 +217,25 @@ function CoderDepot(props){
|
|||
</Menu>
|
||||
</div>
|
||||
)
|
||||
function okUpdate(d,w){
|
||||
function okUpdate(d,w,l){
|
||||
const url = `/${owner}/${projectsId}.json`;
|
||||
axios.put(url,{
|
||||
description:d,website:w
|
||||
description:d,website:w,lesson_url:l
|
||||
}).then(result=>{
|
||||
if(result && result.data && result.data.id){
|
||||
setDesc(result.data.description);
|
||||
setWebsite(result.data.website);
|
||||
setLessonUrl(result.data.lesson_url);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let n = fileInfo && fileInfo.name;
|
||||
const mdFlag = n && n.substring(n.length-3,n.length) === ".md";
|
||||
|
||||
return(
|
||||
<WhiteBack>
|
||||
<UpdateDescModal desc={desc} website={website} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
|
||||
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
|
||||
<Spin spinning={isSpin}>
|
||||
{
|
||||
(dirInfo || fileInfo) &&
|
||||
|
@ -306,7 +314,7 @@ function CoderDepot(props){
|
|||
{
|
||||
lastCommit &&
|
||||
<div className="listtablehead">
|
||||
<User url={getImageUrl(`images/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} />
|
||||
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} />
|
||||
<div className={hideBtn && hide ? "ellipsistxt hide" :"ellipsistxt"}><p id="ptxt">{lastCommit && lastCommit.message}</p></div>
|
||||
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
|
||||
|
||||
|
@ -344,6 +352,7 @@ function CoderDepot(props){
|
|||
{...props}
|
||||
detail={fileInfo}
|
||||
readOnly={readOnly}
|
||||
md={mdFlag}
|
||||
onEdit={onEdit}
|
||||
currentBranch={branchName || (projectDetail && projectDetail.default_branch)}
|
||||
></CoderRootFileDetail>
|
||||
|
@ -372,7 +381,7 @@ function CoderDepot(props){
|
|||
website &&
|
||||
<p className="color-grey-6 df">
|
||||
<i className="iconfont icon-lianjie2 font-15 mr10 color-grey-9"></i>
|
||||
<span style={{wordBreak:"break-all",lineHeight:"20px",marginTop:"5px"}}>{website}</span>
|
||||
<a href={website} target="_blank" style={{wordBreak:"break-all",lineHeight:"20px",marginTop:"5px",textDecoration:"underline"}}>{website}</a>
|
||||
</p>
|
||||
}
|
||||
<p>
|
||||
|
@ -391,6 +400,14 @@ function CoderDepot(props){
|
|||
</p>
|
||||
}
|
||||
</div>
|
||||
{
|
||||
lesson_url &&
|
||||
<div>
|
||||
<Divider />
|
||||
<p className="font-16 color-grey-6">实践课程</p>
|
||||
<a href={lesson_url} target="_blank" className="color-grey-6" style={{textDecoration:"underline"}}>{lesson_url}</a>
|
||||
</div>
|
||||
}
|
||||
{/* 发布 */}
|
||||
{
|
||||
projectDetail && projectDetail.release_versions &&
|
||||
|
@ -402,10 +419,7 @@ function CoderDepot(props){
|
|||
{/* 贡献者 */}
|
||||
{
|
||||
projectDetail && projectDetail.contributors &&
|
||||
<React.Fragment>
|
||||
<Divider />
|
||||
<Contributors contributors={projectDetail && projectDetail.contributors} owner={owner} projectsId={projectsId}/>
|
||||
</React.Fragment>
|
||||
<Contributors contributors={projectDetail && projectDetail.contributors} owner={owner} projectsId={projectsId} />
|
||||
}
|
||||
{/* 语言 */}
|
||||
{ projectDetail && projectDetail.languages &&
|
||||
|
|
|
@ -1,13 +1,49 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import RenderHtml from '../../components/render-html';
|
||||
import { Dropdown , Menu , Spin } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
const $ = window.$;
|
||||
|
||||
function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
||||
const [ menuList ,setMenuList ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
if(readme && readme.content){
|
||||
let path = history.location.pathname;
|
||||
const items = $.map($("#readme").find("h1,h2,h3,h4,h5,h6"), function (el, _) {
|
||||
const anchor = el.id;
|
||||
const level = el.tagName.replace("H", "");
|
||||
const href = `#${anchor}`;
|
||||
return { href:`${path}${href}`,text:el.textContent , level:level }
|
||||
});
|
||||
setMenuList(items);
|
||||
}
|
||||
},[readme])
|
||||
|
||||
function menu(){
|
||||
if(menuList && menuList.length > 0){
|
||||
let hash = history.location.hash;
|
||||
return(
|
||||
<Menu className="menuslist">
|
||||
{
|
||||
menuList.map((item,key)=>{
|
||||
return(
|
||||
<Menu.Item key={item.id} className={decodeURI(hash).indexOf(item.text)>-1 ?"active":""}><Link to={`${item.href}`} style={{paddingLeft:`${item.level *10}px`}} title={item.text}>{item.text}</Link></Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
)
|
||||
}else{
|
||||
return <Spin />
|
||||
}
|
||||
}
|
||||
return(
|
||||
<div className="commonBox" id="readme">
|
||||
<div className="commonBox-title">
|
||||
<span className="mr10">
|
||||
<i className="iconfont icon-wenjian1 font-16 color-grey-9 fl mt3"></i>
|
||||
</span>
|
||||
<Dropdown overlay={menu()}>
|
||||
<i className="iconfont icon-zhangjie1 font-16 color-grey-3 mr10"></i>
|
||||
</Dropdown>
|
||||
<span className="commonBox-title-read">README.md</span>
|
||||
{
|
||||
operate ?
|
||||
|
|
|
@ -74,6 +74,7 @@ class CoderRootCommit extends Component{
|
|||
array.push({
|
||||
name:item.author && item.author.name,
|
||||
login: item.author && item.author.login,
|
||||
id: item.author && item.author.id,
|
||||
image_url:item.author && item.author.image_url,
|
||||
sha:item.sha,
|
||||
time_from_now:item.time_from_now,
|
||||
|
@ -136,10 +137,18 @@ class CoderRootCommit extends Component{
|
|||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="flex1 ml20 font-16 color-grey-3">{item.message}</Link>
|
||||
</p>
|
||||
<p className="f-wrap-alignCenter mt15">
|
||||
<Link to={`/users/${item.login}`} className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`images/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<label className="font-14 color-grey-6" style={{verticalAlign:'middle'}}>{item.name ?`${item.name}:`:""}提交于 {item.time_from_now}</label>
|
||||
</Link>
|
||||
{
|
||||
item.id ?
|
||||
<Link to={`/users/${item.login}`} className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<label className="font-14 color-grey-6" style={{verticalAlign:'middle'}}>{item.name ?`${item.name}:`:""}提交于 {item.time_from_now}</label>
|
||||
</Link>:
|
||||
<span className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<label className="font-14 color-grey-6" style={{verticalAlign:'middle'}}>{item.name ?`${item.name}:`:""}提交于 {item.time_from_now}</label>
|
||||
</span>
|
||||
}
|
||||
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -31,6 +31,18 @@ class CoderRootFileDetail extends Component {
|
|||
this.languages_total();
|
||||
};
|
||||
|
||||
componentDidUpdate=(prevProps)=>{
|
||||
const { content } = this.props && this.props.detail;
|
||||
const prevcontent = prevProps.detail && prevProps.detail.content;
|
||||
if (content && prevcontent) {
|
||||
if (prevcontent !== content){
|
||||
this.setState({
|
||||
description: content
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
languages_total = () => {
|
||||
const { detail } = this.props;
|
||||
const file_name = detail.path.split("/").pop().split(".").pop();
|
||||
|
@ -164,9 +176,9 @@ class CoderRootFileDetail extends Component {
|
|||
current_user,
|
||||
isManager,
|
||||
isDeveloper,
|
||||
md,
|
||||
currentBranch,
|
||||
platform
|
||||
platform,
|
||||
md
|
||||
} = this.props;
|
||||
const { language, languages, description } = this.state;
|
||||
let flag = current_user && current_user.login && (isManager || isDeveloper);
|
||||
|
@ -245,11 +257,7 @@ class CoderRootFileDetail extends Component {
|
|||
<div>
|
||||
{detail.image_type ? (
|
||||
<div className="edu-txt-center pt20 pb20">
|
||||
<img
|
||||
alt=""
|
||||
src={detail.download_url}
|
||||
style={{ maxWidth: "80%" }}
|
||||
/>
|
||||
<img alt="" src={detail.download_url} style={{ maxWidth: "80%" }} />
|
||||
</div>
|
||||
) : detail.direct_download ? (
|
||||
<div className="mt20 text-center">
|
||||
|
@ -268,7 +276,7 @@ class CoderRootFileDetail extends Component {
|
|||
{...this.state}
|
||||
language={language ? language : "javascript"}
|
||||
filepath={`/${detail.path}`}
|
||||
content={detail.content}
|
||||
content={description}
|
||||
readOnly={readOnly}
|
||||
editorType="update"
|
||||
currentBranch={currentBranch}
|
||||
|
|
|
@ -496,9 +496,11 @@ class Detail extends Component {
|
|||
}
|
||||
</span>
|
||||
<span className="detail_tag_btn">
|
||||
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={this.forkFunc}>
|
||||
<i className="iconfont icon-fork color-grey-9 mr3"></i>复刻 (Fork)
|
||||
</a>
|
||||
<Tooltip title="复刻是fork的中文名,即复制代码仓库" placement="bottom">
|
||||
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={this.forkFunc}>
|
||||
<i className="iconfont icon-fork color-grey-9 mr3"></i>复刻
|
||||
</a>
|
||||
</Tooltip>
|
||||
{
|
||||
forked_count > 0 ?
|
||||
platform ?
|
||||
|
@ -516,6 +518,7 @@ class Detail extends Component {
|
|||
{
|
||||
firstSync ? "" :
|
||||
<DetailBanner
|
||||
history={this.props.history}
|
||||
list={bannerList}
|
||||
owner={owner}
|
||||
projectsId={projectsId}
|
||||
|
|
|
@ -65,7 +65,7 @@ export default ({ match , history }) => {
|
|||
<div className="f-wrap-between" style={{ alignItems: "center" }}>
|
||||
<ul className="df">
|
||||
<User
|
||||
url={(committer && getImageUrl(`images/${committer.image_url}`))|| "https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3025493530,1989042357&fm=26&gp=0.jpg"}
|
||||
url={(committer && getImageUrl(`/${committer.image_url}`))|| "https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3025493530,1989042357&fm=26&gp=0.jpg"}
|
||||
name={committer && committer.name}
|
||||
/>
|
||||
{committer && committer.time_from_now && <li className="ml20 mt2">{committer.time_from_now}</li>}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Menu, Input , Spin, Pagination , Popover , Select } from 'antd';
|
||||
import { getUrl } from 'educoder';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import '../css/index.scss'
|
||||
import './list.css';
|
||||
import './Index.scss';
|
||||
|
@ -271,7 +271,7 @@ class Index extends Component {
|
|||
return(
|
||||
<div onClick={()=>this.getoDetail(item.author && item.author.login,item.identifier)}>
|
||||
<div className="mainInfo">
|
||||
<img src={getUrl(`/images/${item.author && item.author.image_url}`)} alt=""/>
|
||||
<img src={getImageUrl(`/${item.author && item.author.image_url}`)} alt=""/>
|
||||
<p className="school">{item.name}</p>
|
||||
<p className="name">{item.author && item.author.name}</p>
|
||||
</div>
|
||||
|
|
|
@ -220,6 +220,9 @@
|
|||
.listtablebody{
|
||||
li.listtablepath{
|
||||
a{color: #40a9ff;}
|
||||
p{
|
||||
margin-bottom: 0px!important;
|
||||
}
|
||||
}
|
||||
li{
|
||||
height: 42px;
|
||||
|
@ -283,4 +286,27 @@
|
|||
.downMenu{
|
||||
box-shadow: 0px 0px 9px rgba(134, 134, 134,0.4);
|
||||
background-color: #fff;
|
||||
.ant-menu-vertical .ant-menu-item:hover{
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
}
|
||||
|
||||
.menuslist{
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding:10px 15px;
|
||||
border-radius: 4px;
|
||||
.ant-dropdown-menu-item{
|
||||
border-radius: 8px;
|
||||
text-align: left!important;
|
||||
a{
|
||||
width: 350px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.ant-dropdown-menu-item.active{
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
}
|
|
@ -27,8 +27,8 @@ class IndexItem extends Component {
|
|||
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
||||
</a>
|
||||
:
|
||||
<Link to={`/users/${item.author.login}`} className="show-user-link">
|
||||
<img className="p-r-photo" alt="" src={getImageUrl(`${item.author && item.author.image_url}`)} ></img>
|
||||
<Link to={item.author && (item.author.type === "Organization" ? `/organize/${item.author.login}`:`/users/${item.author.login}`)} className="show-user-link">
|
||||
<img className="p-r-photo" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
|
||||
</Link>
|
||||
}
|
||||
<div className="p-r-Infos">
|
||||
|
|
|
@ -281,7 +281,6 @@
|
|||
height:100%;
|
||||
}
|
||||
.files-md{
|
||||
border:1px solid #eee;
|
||||
padding:20px;
|
||||
}
|
||||
/* 详情-代码 */
|
||||
|
@ -437,9 +436,6 @@
|
|||
font-size: 16px;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
.branchUl{
|
||||
padding:0px 30px;
|
||||
}
|
||||
.branchUl li{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
|
@ -50,7 +50,7 @@ function Contribute(props){
|
|||
list.map((item,key)=>{
|
||||
return(
|
||||
<AlignCenter>
|
||||
<img alt="" style={{borderRadius:"50%",marginRight:"10px"}} src={getImageUrl(`images/${item.image_url}`)} width="50px" height="50px"/>
|
||||
<img alt="" style={{borderRadius:"50%",marginRight:"10px"}} src={getImageUrl(`/${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>
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Skeleton } from 'antd';
|
||||
import { Skeleton , Tooltip } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
function DetailBanner({ list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){
|
||||
function DetailBanner({ history,list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){
|
||||
const [ menuName , setMenuName ] = useState(undefined);
|
||||
useEffect(()=>{
|
||||
if(list){
|
||||
// 没有资源库banner但是通过连接进资源库页面时
|
||||
if(pathname && pathname==="source"){
|
||||
let a = list.filter(item=>item.menu_name === "resources");
|
||||
if(a && a.length === 0){
|
||||
history.push(`/projects/${owner}/${projectsId}`);
|
||||
}
|
||||
}
|
||||
setMenuName(list);
|
||||
}
|
||||
},[list]);
|
||||
|
@ -39,11 +46,13 @@ function DetailBanner({ list , owner , projectsId , isManager , url , pathname ,
|
|||
{
|
||||
item.menu_name === "issues" &&
|
||||
<li className={pathname==="issues" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
|
||||
<i className={pathname==="issues" ? "iconfont icon-renwu color-grey-3 mr5 font-14":"iconfont icon-renwu color-grey-6 font-14 mr5"}></i>
|
||||
<span>易修 (Issue)</span>
|
||||
{projectDetail && projectDetail.issues_count ? <span className="num">{projectDetail.issues_count}</span> : ""}
|
||||
</Link>
|
||||
<Tooltip title="易修是Issue的中文名,即问题列表" placement="bottom">
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
|
||||
<i className={pathname==="issues" ? "iconfont icon-renwu color-grey-3 mr5 font-14":"iconfont icon-renwu color-grey-6 font-14 mr5"}></i>
|
||||
<span>易修</span>
|
||||
{projectDetail && projectDetail.issues_count ? <span className="num">{projectDetail.issues_count}</span> : ""}
|
||||
</Link>
|
||||
</Tooltip>
|
||||
</li>
|
||||
}
|
||||
{
|
||||
|
@ -67,7 +76,7 @@ function DetailBanner({ list , owner , projectsId , isManager , url , pathname ,
|
|||
:""
|
||||
}
|
||||
{
|
||||
item.menu_name === "source" &&
|
||||
item.menu_name === "resources" &&
|
||||
<li className={pathname==="source" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/source`, state }}>
|
||||
<i className={pathname==="source" ? "iconfont icon-ziyuanpaihanghetuijian color-grey-3 mr5 font-14":"iconfont icon-ziyuanpaihanghetuijian color-grey-6 font-14 mr5"}></i>
|
||||
|
@ -95,19 +104,19 @@ function DetailBanner({ list , owner , projectsId , isManager , url , pathname ,
|
|||
</Link>
|
||||
</li>
|
||||
}
|
||||
{
|
||||
item.menu_name === "setting" &&
|
||||
<li className={pathname === "setting" ? "active" : ""}>
|
||||
<Link to={`/projects/${owner}/${projectsId}/setting`}>
|
||||
<i className={url && url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||
<span>仓库设置</span>
|
||||
</Link>
|
||||
</li>
|
||||
}
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
}
|
||||
{
|
||||
isManager && platform ?
|
||||
<li className={pathname === "setting" ? "active" : ""}>
|
||||
<Link to={`/projects/${owner}/${projectsId}/setting`}>
|
||||
<i className={url && url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||
<span>仓库设置</span>
|
||||
</Link>
|
||||
</li>:""
|
||||
}
|
||||
</ul>
|
||||
:
|
||||
<Skeleton paragraph={false} active={true}/>
|
||||
|
|
|
@ -2,13 +2,13 @@ import React , { forwardRef, useEffect } from 'react';
|
|||
import {Form , Modal , Input } from 'antd';
|
||||
import "./sub.scss";
|
||||
const { TextArea } = Input;
|
||||
function UpdateDescModal({form , visible , onCancel , onOk,desc,website}){
|
||||
function UpdateDescModal({form , visible , onCancel , onOk,desc,website,lesson_url}){
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
if(desc || website){
|
||||
setFieldsValue({
|
||||
website,desc
|
||||
website,desc,lesson_url
|
||||
})
|
||||
}
|
||||
},[desc,website])
|
||||
|
@ -17,7 +17,7 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website}){
|
|||
validateFields((err,values)=>{
|
||||
if(!err){
|
||||
onCancel();
|
||||
onOk(values.desc,values.website)
|
||||
onOk(values.desc,values.website,values.lesson_url)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -49,6 +49,13 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website}){
|
|||
<Input placeholder="website链接"/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="实践课程">
|
||||
{getFieldDecorator("lesson_url",{
|
||||
rules:[]
|
||||
})(
|
||||
<Input placeholder="实践课程链接"/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
)
|
||||
|
|
|
@ -22,7 +22,7 @@ function Commits({ commits , projectsId , owner }){
|
|||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(item.sha)}`} className="color-blue">浏览代码</Link>
|
||||
</FlexAJ>
|
||||
<AlignCenter className="mt15">
|
||||
<User url={getImageUrl(`images/${item.committer && item.committer.image_url}`)} name={`${item.committer && item.committer.name}`}></User><span>:提交于{item.time_from_now}</span>
|
||||
<User url={getImageUrl(`/${item.committer && item.committer.image_url}`)} name={`${item.committer && item.committer.name}`}></User><span>:提交于{item.time_from_now}</span>
|
||||
</AlignCenter>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, { Component } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Popconfirm, Tag } from "antd";
|
||||
import { Tag } from "antd";
|
||||
import { AlignCenter } from '../Component/layout';
|
||||
import { getImageUrl } from "educoder";
|
||||
import "./merge.css";
|
||||
|
||||
|
@ -74,13 +75,13 @@ class MergeItem extends Component {
|
|||
>
|
||||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(`images/${item && item.avatar_url}`)}
|
||||
src={getImageUrl(`/${item && item.avatar_url}`)}
|
||||
alt=""
|
||||
width="24"
|
||||
height="24"
|
||||
/>
|
||||
</Link>
|
||||
<span>
|
||||
<AlignCenter>
|
||||
<Link
|
||||
to={`/users/${item && item.author_login}`}
|
||||
className="show-user-link color-grey-8 ml5"
|
||||
|
@ -124,7 +125,7 @@ class MergeItem extends Component {
|
|||
</Link>
|
||||
</Tag>
|
||||
</span>
|
||||
</span>
|
||||
</AlignCenter>
|
||||
</p>
|
||||
</div>
|
||||
<ul
|
||||
|
|
|
@ -101,7 +101,7 @@ class MergeSubmit extends Component{
|
|||
render: (text,item) => (
|
||||
<span className="f-wrap-alignCenter">
|
||||
<Link to={`/users/${item.login}`} className="show-user-link">
|
||||
<img src={getImageUrl(`images/${item.image_url}`)} alt="" width="28px" height="28px" className="mr3 radius"/>
|
||||
<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr3 radius"/>
|
||||
<label className="hide-1" style={{maxWidth:"75px",'vertical-align':'middle'}}>{text}</label>
|
||||
</Link>
|
||||
</span>
|
||||
|
|
|
@ -331,26 +331,14 @@ class MessageCount extends Component {
|
|||
}
|
||||
|
||||
<div className="mt15">
|
||||
<Link
|
||||
to={`/users/${data.issue.author_login}`}
|
||||
className="show-user-link"
|
||||
>
|
||||
<img
|
||||
className="mr5"
|
||||
src={getImageUrl(
|
||||
`images/${data.issue.author_picture}`
|
||||
)}
|
||||
alt=""
|
||||
width="24"
|
||||
height="24"
|
||||
<Link to={`/users/${data.issue.author_login}`} className="show-user-link">
|
||||
<img className="mr5" src={getImageUrl(`/${data.issue.author_picture}`)}
|
||||
alt="" width="24" height="24" style={{borderRadius:"50%"}}
|
||||
/>
|
||||
</Link>
|
||||
<span className="ver-middle">
|
||||
<span className="color-grey-8 mr5">由</span>
|
||||
<Link
|
||||
to={`/users/${data.issue.author_login}`}
|
||||
className="show-user-link color-blue"
|
||||
>
|
||||
<Link to={`/users/${data.issue.author_login}`} className="show-user-link color-blue">
|
||||
{data.issue.author_name}
|
||||
</Link>
|
||||
<span className="ml5 color-grey-8">
|
||||
|
|
|
@ -178,7 +178,7 @@ class NewMerge extends Component {
|
|||
let arr = projects_names && projects_names.filter(item=>item.id===value);
|
||||
let identifier = arr && arr[0].project_id;
|
||||
let login = arr && arr[0].project_user_login;
|
||||
let is_fork_id = parseInt(value) !== parseInt(id)
|
||||
let is_fork_id = parseInt(value) !== parseInt(id);
|
||||
this.setState({
|
||||
isSpin: true,
|
||||
merge_head: is_fork_id,
|
||||
|
|
|
@ -253,24 +253,6 @@ class merge extends Component {
|
|||
</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
const Paginations = (
|
||||
<React.Fragment>
|
||||
{search_count > limit ? (
|
||||
<div className="mt30 mb50 edu-txt-center">
|
||||
<Pagination
|
||||
simple
|
||||
defaultCurrent={page}
|
||||
total={search_count}
|
||||
pageSize={limit}
|
||||
onChange={this.ChangePage}
|
||||
></Pagination>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
return (
|
||||
<div className="main" style={{padding:"0px"}}>
|
||||
<div className="topWrapper" style={{borderBottom:"none",padding:"20px"}}>
|
||||
|
@ -419,9 +401,21 @@ class merge extends Component {
|
|||
{...this.props}
|
||||
{...this.state}
|
||||
></OrderItem>
|
||||
{Paginations}
|
||||
</div>
|
||||
):""}
|
||||
{search_count > select_params.limit ? (
|
||||
<div className="mt30 mb50 edu-txt-center">
|
||||
<Pagination
|
||||
simple
|
||||
current={select_params.page}
|
||||
total={search_count}
|
||||
pageSize={select_params.limit}
|
||||
onChange={this.ChangePage}
|
||||
></Pagination>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{ data && data.issues && data.issues.length === 0 ? <NoneData _html="暂时还没有相关数据!" projectsId={projectsId} owner={owner} /> :""}
|
||||
</Spin>
|
||||
</div>
|
||||
|
|
|
@ -34,17 +34,19 @@ class MergeForm extends Component {
|
|||
this.set_defatul();
|
||||
};
|
||||
componentDidUpdate=(prevPros)=>{
|
||||
const { projectsId ,owner } = this.props.match.params;
|
||||
const pId = prevPros.match.params.projectsId;
|
||||
const oId = prevPros.match.params.owner;
|
||||
if(pId !== projectsId || oId !== owner ){
|
||||
// console.log("切换了项目分支···········");
|
||||
this.get_default_selects();
|
||||
}
|
||||
if(prevPros && this.props && !this.props.checkIfLogin()){
|
||||
this.props.history.push("/403")
|
||||
return
|
||||
}
|
||||
}
|
||||
// check_is_login =() =>{
|
||||
// if(!this.props.checkIfLogin()){
|
||||
// this.props.history.push("/403")
|
||||
// return
|
||||
// }
|
||||
// };
|
||||
|
||||
get_default_selects = () => {
|
||||
const { projectsId ,owner } = this.props.match.params;
|
||||
this.setState({ isSpin: true });
|
||||
|
|
|
@ -117,7 +117,7 @@ class UserSubmitComponent extends Component {
|
|||
<span className="df" style={{ alignItems: "center" }}>
|
||||
<Link to={`/users/${current_user && current_user.login}`} className="show-user-link" >
|
||||
<img
|
||||
src={getImageUrl(`images/${current_user && current_user.image_url}`)}
|
||||
src={getImageUrl(`/${current_user && current_user.image_url}`)}
|
||||
alt=""
|
||||
className="screwImg"
|
||||
/>
|
||||
|
|
|
@ -12,6 +12,13 @@ class m_editor extends Component {
|
|||
editorValue: this.props.content,
|
||||
};
|
||||
}
|
||||
componentDidUpdate=(prevProps)=>{
|
||||
if(prevProps && this.props && this.props.content !== prevProps.content){
|
||||
this.setState({
|
||||
editorValue:this.props.content
|
||||
})
|
||||
}
|
||||
}
|
||||
changeEditor = (editorValue) => {
|
||||
this.setState({
|
||||
editorValue,
|
||||
|
@ -44,7 +51,7 @@ class m_editor extends Component {
|
|||
return (
|
||||
<React.Fragment>
|
||||
<div>
|
||||
<div className="branchTable">
|
||||
<div className="branchTable" style={{border:"1px solid #eee"}}>
|
||||
<Editor
|
||||
height="400px"
|
||||
language={language ? language : "plaintext"}
|
||||
|
@ -57,7 +64,7 @@ class m_editor extends Component {
|
|||
/>
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<div style={{padding:"20px",marginTop:"20px",borderTop:"1px solid #d9d9d9"}}>
|
||||
<div style={{marginTop:"20px"}}>
|
||||
<UserSubmitComponent
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
|
|
|
@ -212,7 +212,7 @@ class Detail extends Component {
|
|||
>
|
||||
<img
|
||||
className="user_img"
|
||||
src={getImageUrl(`images/${data && data.author_picture}`)}
|
||||
src={getImageUrl(`/${data && data.author_picture}`)}
|
||||
alt=""
|
||||
width="50"
|
||||
height="50"
|
||||
|
|
|
@ -218,7 +218,7 @@ class MilepostDetail extends Component {
|
|||
</span>
|
||||
<div className="milepostdiv">
|
||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建任务</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建易修</Link>
|
||||
</div>
|
||||
</FlexAJ>
|
||||
</div>
|
||||
|
|
|
@ -352,12 +352,12 @@ class order extends Component {
|
|||
if (this.props.checkIfLogin()) {
|
||||
return(
|
||||
<Link className="topWrapper_btn ml10" target="_blank" to={`/projects/${owner}/${projectsId}/issues/new`}>
|
||||
+ 创建任务
|
||||
+ 创建易修
|
||||
</Link>
|
||||
)
|
||||
}else{
|
||||
return(
|
||||
<a className="topWrapper_btn ml10" onClick={this.islogin}>+ 创建任务</a>
|
||||
<a className="topWrapper_btn ml10" onClick={this.islogin}>+ 创建易修</a>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -310,14 +310,14 @@ class order_form extends Component {
|
|||
<div className="list-right">
|
||||
<div className="pd20">
|
||||
<h3 className="mb15">
|
||||
{form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}任务
|
||||
{form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}易修
|
||||
</h3>
|
||||
<Form.Item>
|
||||
{getFieldDecorator("subject", {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写任务标题",
|
||||
message: "请填写易修标题",
|
||||
},
|
||||
]
|
||||
})(<Input placeholder="标题" size="large" />)}
|
||||
|
|
|
@ -26,8 +26,8 @@ function Collaborator(props){
|
|||
{
|
||||
author && author.type === "Organization" ?
|
||||
<span>
|
||||
<span style={{cursor:"pointer"}} className={nav === "1" ? "font-18 text-black color-blue":"font-18 text-black"} onClick={()=>setNav("1")}>协作者管理</span>
|
||||
<span style={{cursor:"pointer"}} className={nav === "2" ? "font-18 text-black ml30 color-blue":"font-18 text-black ml30"} onClick={()=>setNav("2")}>团队管理</span>
|
||||
<span style={{cursor:"pointer"}} className={nav === "1" ? "font-18 text-black color-blue":"font-18 text-black"} onClick={()=>{setNav("1");setNewId(undefined)}}>协作者管理</span>
|
||||
<span style={{cursor:"pointer"}} className={nav === "2" ? "font-18 text-black ml30 color-blue":"font-18 text-black ml30"} onClick={()=>{setNav("2");setNewId(undefined)}}>团队管理</span>
|
||||
</span>
|
||||
:
|
||||
<span className="font-18 text-black">协作者管理</span>
|
||||
|
@ -42,7 +42,7 @@ function Collaborator(props){
|
|||
<div>
|
||||
{
|
||||
nav === "1" ?
|
||||
<Member newId={newId} projectsId={projectsId} owner={owner} project_id={props.project_id} author={props.author} showNotification={props.showNotification}/>
|
||||
<Member newId={newId} projectsId={projectsId} owner={owner} project_id={props.project_id} author={props.projectDetail && props.projectDetail.author} showNotification={props.showNotification}/>
|
||||
:
|
||||
<Group owner={owner} projectsId={projectsId} newGroupId={newGroupId}/>
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@ function CollaboratorMember({projectsId,owner,project_id,author,showNotification
|
|||
const [ role , setRole ] = useState(undefined);
|
||||
const [ listData , setListData ] = useState(undefined);
|
||||
const [ total , setTotal ] = useState(0);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(newId){
|
||||
addCollaborator(newId);
|
||||
|
@ -188,7 +186,7 @@ function CollaboratorMember({projectsId,owner,project_id,author,showNotification
|
|||
className="show-user-link"
|
||||
>
|
||||
<img
|
||||
src={getImageUrl(`images/${text}`)}
|
||||
src={getImageUrl(`/${text}`)}
|
||||
alt=""
|
||||
width="32px"
|
||||
height="32px"
|
||||
|
|
|
@ -13,6 +13,7 @@ const menu = [
|
|||
{name:"易修 (Issue)",index:"issues"},
|
||||
{name:"合并请求",index:"pulls"},
|
||||
{name:"工作流(beta版)",index:"devops"},
|
||||
{name:"资源库",index:"resources"},
|
||||
{name:"里程碑",index:"versions"},
|
||||
{name:"动态",index:"activity"},
|
||||
]
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
import React , { forwardRef, useEffect } from 'react';
|
||||
import { Modal , Form , Input } from 'antd';
|
||||
|
||||
function AddTag({form , visible , onCancel ,onOk}){
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
setFieldsValue({tagName:undefined})
|
||||
},[visible])
|
||||
|
||||
function submit(){
|
||||
validateFields((error,values)=>{
|
||||
if(!error){
|
||||
onOk(values);
|
||||
}
|
||||
})
|
||||
}
|
||||
const layout = {
|
||||
labelCol: { span: 5 },
|
||||
wrapperCol: { span: 18 },
|
||||
};
|
||||
return(
|
||||
<Modal
|
||||
title={"新增标签"}
|
||||
closable={false}
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
onOk={submit}
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
width="400px"
|
||||
centered
|
||||
>
|
||||
<Form {...layout}>
|
||||
<Form.Item label="标签名">
|
||||
{getFieldDecorator("tagName",{
|
||||
rules:[{required:true,message:"请输入标签名"}]
|
||||
})(
|
||||
<Input placeholder="请输入标签名" width="200px" autoComplete="off" />
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
)
|
||||
|
||||
}
|
||||
export default Form.create()(forwardRef(AddTag));
|
|
@ -1,16 +1,286 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import './Index.scss';
|
||||
import { Blueback , FlexAJ } from '../Component/layout';
|
||||
import { AlignCenter, Blueback , FlexAJ } from '../Component/layout';
|
||||
import { Dropdown, Input , Menu , Pagination, Spin , Popconfirm, Button } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
import UploadSource from './UploadSource';
|
||||
import AddTag from './AddTag';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import Nodata from '../Nodata';
|
||||
import axios from 'axios';
|
||||
|
||||
const { Search } = Input;
|
||||
const sort = [
|
||||
"按上传时间排序",
|
||||
"按下载次数排序"
|
||||
]
|
||||
const limit = 15;
|
||||
const https = 'https://testfiles.trustie.net';
|
||||
function Index(props){
|
||||
const [ sortValue , setSortValue ] = useState(0);
|
||||
const [ page , setPage ] = useState(1);
|
||||
const [ total , setTotal ] = useState(0);
|
||||
const [ search , setSearch ] = useState(undefined);
|
||||
const [ data , setData ] = useState(undefined);
|
||||
const [ isSpin , setIsSpin ] = useState(true);
|
||||
const [ error , setError ] = useState(false);
|
||||
const [ attachments , setAttachments ] = useState(undefined);
|
||||
|
||||
const [ id , setId ] = useState(undefined);
|
||||
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ addVisible , setAddVisible ] = useState(false);
|
||||
|
||||
const repo_id = props.projectDetail && props.projectDetail.repo_id;
|
||||
const owner = props.match.params.owner;
|
||||
const current_user = props.current_user;
|
||||
|
||||
useEffect(()=>{
|
||||
if(owner && repo_id){
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
},[repo_id,owner,search,sortValue,page])
|
||||
|
||||
function getData(){
|
||||
const url = https +`/api/project/achievement/`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
projectId:repo_id,
|
||||
curPage:page,
|
||||
pageSize:limit,
|
||||
name:search,
|
||||
sort:sortValue+1,
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
setData(result.data.data.rows);
|
||||
setTotal(result.data.data.total);
|
||||
setIsSpin(false);
|
||||
setError(false);
|
||||
}
|
||||
}).catch(error=>{setIsSpin(false);setError(true);})
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function onSearch(value){
|
||||
setSearch(value);
|
||||
}
|
||||
|
||||
// 切换排序方式
|
||||
function changeSort(e,index){
|
||||
setSortValue(index);
|
||||
}
|
||||
|
||||
|
||||
const menu=(
|
||||
<Menu>
|
||||
{
|
||||
sort && sort.map((item,key)=>{
|
||||
return(
|
||||
<Menu.Item onClick={(e)=>changeSort(e,key)} value={key} className={key=== sortValue ?"color-blue":""}>{item}</Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
)
|
||||
|
||||
function listmenu(id,attachments,isPublic){
|
||||
return(
|
||||
<Menu>
|
||||
<Menu.Item onClick={()=>{setId(id);setVisible(true);setAttachments(attachments)}}>更新版本</Menu.Item>
|
||||
<Menu.Item onClick={()=>changeStatus(id,isPublic===1?0:1)}>{isPublic === 1 ? "设为私有":"设为公开"}</Menu.Item>
|
||||
<Menu.Item onClick={()=>deleteSourceFunc(id)}>删除资源</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
// 更细私有状态
|
||||
function changeStatus(id,isPublic){
|
||||
const url = https+`/api/project/achievement/updateStatus`;
|
||||
axios.put(url,{
|
||||
id,status:isPublic
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
props.showNotification(`资源${isPublic === 1 ? "设为公开":"设为私有"}成功!`);
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
}).catch({})
|
||||
}
|
||||
|
||||
// 删除资源方法
|
||||
function deleteSourceFunc(id){
|
||||
props.confirm({
|
||||
content: "是否确认删除所选资源文件?",
|
||||
onOk: () => {
|
||||
const url = https + `/api/project/achievement/${id}`;
|
||||
axios.delete(url).then(result=>{
|
||||
if(result && result.data && result.data.code === "1"){
|
||||
props.showNotification("资源删除成功");
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 上传资源成功
|
||||
function onOk(){
|
||||
setVisible(false);
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
|
||||
// 确认删除标签
|
||||
function removeTagFunc(id,tag){
|
||||
const url = https + `/api/project/achievement/deleteTag`;
|
||||
axios.delete(url,{
|
||||
params:{id,tagName:tag}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
props.showNotification("标签删除成功");
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
}).then(error=>{})
|
||||
}
|
||||
|
||||
function addPanel(id){
|
||||
setAddVisible(true);
|
||||
setId(id);
|
||||
}
|
||||
|
||||
function onCancelAdd(){
|
||||
setId(undefined);
|
||||
setAddVisible(false);
|
||||
}
|
||||
|
||||
// 添加标签
|
||||
function sureAddTag(values){
|
||||
const url = https+`/api/project/achievement/addTag?id=`+id+`&tagName=`+values.tagName;
|
||||
axios.put(url).then(result=>{
|
||||
if(result){
|
||||
setId(undefined);
|
||||
setAddVisible(false);
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="sourcePanel">
|
||||
<AddTag
|
||||
visible={addVisible}
|
||||
onCancel={onCancelAdd}
|
||||
onOk={sureAddTag}
|
||||
/>
|
||||
<UploadSource
|
||||
visible={visible}
|
||||
onCancel={()=>setVisible(false)}
|
||||
onOk={onOk}
|
||||
showNotification={props.showNotification}
|
||||
owner={owner}
|
||||
projectsId={repo_id}
|
||||
id={id}
|
||||
attachments={attachments}
|
||||
/>
|
||||
<div className="headtitle">
|
||||
<FlexAJ>
|
||||
<span className="font-18">资源库</span>
|
||||
<Blueback>上传资源</Blueback>
|
||||
<span className="font-18">资源库{total ? <span>({total})</span>:""}</span>
|
||||
{ current_user && current_user.login && (props.projectDetail && props.projectDetail.permission) ?
|
||||
<Blueback onClick={()=>{setId(undefined);setVisible(true);}}>上传资源</Blueback>:""
|
||||
}
|
||||
</FlexAJ>
|
||||
</div>
|
||||
<FlexAJ className="subHeadtitle">
|
||||
<Search
|
||||
placeholder="在项目内搜索资源"
|
||||
onSearch={onSearch}
|
||||
allowClear
|
||||
enterButton="搜索"
|
||||
width="220px"
|
||||
/>
|
||||
<Dropdown overlay={menu} placement="bottomRight">
|
||||
<span className="color-grey-9">{sort[sortValue]}<i className="iconfont icon-sanjiaoxing-down font-16 color-grey-9 ml3"></i></span>
|
||||
</Dropdown>
|
||||
</FlexAJ>
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="bodycontent">
|
||||
{
|
||||
data && data.length> 0 &&
|
||||
<ul className="bodycontentul">
|
||||
{
|
||||
data.map((item,key)=>{
|
||||
return(
|
||||
<li>
|
||||
<Link to= {`/users/${item.login}`} className="infoImg"><img src={getImageUrl(`/${item.imageUrl}`)} alt="" /></Link>
|
||||
<div style={{flex:'1',width:"0"}}>
|
||||
<FlexAJ>
|
||||
<AlignCenter>
|
||||
<a href={https+`/busiAttachments/download/${item.attachId}`} download className="infoname">{item.fileName}</a>
|
||||
<a href={https + `/busiAttachments/view/${item.attachId}`}><i className="iconfont icon-shenqinggongkai font-15 ml10 color-grey-9"></i></a>
|
||||
{item.isPublic === 0 && <span className="privateTip">私有</span>}
|
||||
</AlignCenter>
|
||||
{ current_user && current_user.login &&
|
||||
<Dropdown overlay={()=>listmenu(item.id,item.attachments,item.isPublic)} placement={'bottomRight'}>
|
||||
<i className="iconfont icon-gengduo1 color-grey-6"></i>
|
||||
</Dropdown>
|
||||
}
|
||||
</FlexAJ>
|
||||
<p className="infos">
|
||||
<span>上传时间:<span>{item.uploadTime}</span></span>
|
||||
<span>文件大小:<span>{item.fileSize}</span></span>
|
||||
<span>下载:<span>{item.download}</span></span>
|
||||
</p>
|
||||
<p className="infodesc task-hide-2">{item.remark}</p>
|
||||
<div className="infotag">
|
||||
{
|
||||
item.tags && item.tags.length>0 && item.tags.map((i,k)=>{
|
||||
return(
|
||||
<span>{i}
|
||||
{
|
||||
current_user && (current_user.login === item.login) ?
|
||||
<Popconfirm title="确定要删除当前标签?" onConfirm={()=>removeTagFunc(item.id,i)} okText="是" cancelText="否">
|
||||
<i className="iconfont icon-guanbi font-12 ml2"></i>
|
||||
</Popconfirm>:""
|
||||
}
|
||||
</span>
|
||||
)
|
||||
})
|
||||
}
|
||||
{
|
||||
current_user && (current_user.login === item.login) &&
|
||||
<a className="color-blue font-12" onClick={()=>addPanel(item.id)} style={{height:"20px",lineHeight:"20px"}}>+新增标签</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
{
|
||||
((data && data.length === 0) || error) && <Nodata _html="暂无数据"/>
|
||||
}
|
||||
{
|
||||
total > limit &&
|
||||
<div className="pt20 pb20 edu-txt-center">
|
||||
<Pagination
|
||||
simple
|
||||
current={page}
|
||||
pageSize={limit}
|
||||
total={total}
|
||||
onChange={(p)=>{setPage(p)}}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,4 +8,80 @@
|
|||
padding:15px 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.subHeadtitle{
|
||||
padding:15px 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
.ant-input-group-wrapper{
|
||||
width:320px;
|
||||
.ant-btn.ant-input-search-button{
|
||||
margin: 0px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bodycontent{
|
||||
padding:0px 20px;
|
||||
min-height: 500px;
|
||||
& > ul.bodycontentul > li{
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding:20px 0px;
|
||||
align-items: flex-start;
|
||||
&:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
.infoImg{
|
||||
img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
margin-right: 15px;
|
||||
}
|
||||
.infoname{
|
||||
font-size: 16px;
|
||||
}
|
||||
.privateTip{
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
background-color: orange;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
padding:0px 3px;
|
||||
color: #fff;
|
||||
}
|
||||
.infos{
|
||||
& > span{
|
||||
margin-right: 20px;
|
||||
color: #999;
|
||||
& >span{
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
.infodesc{
|
||||
color: #666;
|
||||
line-height: 20px;
|
||||
margin:5px 0px!important;
|
||||
}
|
||||
.infotag{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
span{
|
||||
display: block;
|
||||
padding:0px 4px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
margin-right: 10px;
|
||||
border: 1px solid #f8df8c;
|
||||
background: #fffce6;
|
||||
color: #0d90c3;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { Upload, Button } from 'antd';
|
||||
import { appendFileSizeToUploadFileAll } from 'educoder';
|
||||
|
||||
import axios from 'axios';
|
||||
function Uploads({ className , size , actionUrl,fileList,showNotification , load}) {
|
||||
const [ files , setFiles ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
if(fileList){
|
||||
init();
|
||||
}
|
||||
},[fileList]);
|
||||
|
||||
function init(){
|
||||
let f = appendFileSizeToUploadFileAll(fileList);
|
||||
setFiles(f);
|
||||
}
|
||||
function onAttachmentRemove(file){
|
||||
if (!file.percent || file.percent === 100) {
|
||||
deleteAttachment(file);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function deleteAttachment(file){
|
||||
let id = file.response && file.response.data && file.response.data.id;
|
||||
const url = actionUrl + `/busiAttachments/${id}`;
|
||||
axios.delete(url).then((response) => {
|
||||
if (response.data) {
|
||||
if (response.data.code === "1") {
|
||||
let nf = files.filter(item=>item.response.data.id !== id);
|
||||
setFiles(nf);
|
||||
fileIdList(nf);
|
||||
} else {
|
||||
showNotification(response.data.message)
|
||||
}
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function handleChange (info) {
|
||||
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
|
||||
let fileList = info.fileList;
|
||||
let len = info.fileList && info.fileList.length;
|
||||
setFiles(appendFileSizeToUploadFileAll([fileList[len-1]]));
|
||||
fileIdList(fileList[len-1]);
|
||||
}
|
||||
}
|
||||
|
||||
function fileIdList (fileList) {
|
||||
let data = fileList.response && fileList.response.data;
|
||||
fileList && load && load(data && data.id,data && data.fileName);
|
||||
}
|
||||
|
||||
function beforeUpload(file){
|
||||
const isLt100M = file.size / 1024 / 1024 < size;
|
||||
if (!isLt100M) {
|
||||
showNotification(`文件大小必须小于${size}MB!`);
|
||||
}
|
||||
return isLt100M;
|
||||
}
|
||||
|
||||
const upload = {
|
||||
name: 'file',
|
||||
fileList: files,
|
||||
action: actionUrl+`/busiAttachments/upload`,
|
||||
onChange:handleChange,
|
||||
onRemove:onAttachmentRemove,
|
||||
beforeUpload:beforeUpload,
|
||||
maxCount:1
|
||||
};
|
||||
return (
|
||||
<Upload {...upload} className={className}>
|
||||
<Button type={"default"}>上传文件</Button>
|
||||
<span className="ml10 color-grey-9">(你可以上传小于<span className="color-red">{size}MB</span>的文件)</span>
|
||||
</Upload>
|
||||
)
|
||||
}
|
||||
export default Uploads;
|
|
@ -0,0 +1,150 @@
|
|||
import React , { forwardRef, useEffect, useState } from 'react';
|
||||
import { Modal , Form , Checkbox , Input , Table } from 'antd';
|
||||
import Upload from './Upload';
|
||||
import { AlignCenter } from '../Component/layout';
|
||||
import axios from 'axios';
|
||||
const { TextArea } = Input;
|
||||
|
||||
const https = 'https://testfiles.trustie.net';
|
||||
function UploadSource({ form , visible , onCancel , onOk , showNotification , attachments , id ,owner,projectsId}){
|
||||
const [ tableData , setTableData ] = useState(undefined);
|
||||
const [ fileId , setFilesId ] = useState(undefined);
|
||||
const [ fileName , setFileName ] = useState(undefined);
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
if(id && attachments){
|
||||
setTableData(attachments);
|
||||
}
|
||||
},[id,attachments])
|
||||
// 上传附件后得到的文件id数组
|
||||
function UploadFunc(id,name){
|
||||
setFilesId(id);
|
||||
setFileName(name);
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
dataIndex:"fileName",
|
||||
key:"fileName",
|
||||
title:"资源名称",
|
||||
width:"42%",
|
||||
ellipsis:true,
|
||||
render:(value,item,key)=>{
|
||||
return <AlignCenter>
|
||||
<div className="task-hide" style={{maxWidth:key===0 ? "240px":"100%"}}>{value}</div>
|
||||
{ key === 0 && <span className="currentTip">当前版本</span> }
|
||||
</AlignCenter>
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex:"downloads",
|
||||
key:"downloads",
|
||||
title:"下载数",
|
||||
width:"14%",
|
||||
className:"edu-txt-center"
|
||||
},
|
||||
{
|
||||
dataIndex:"fileSizeString",
|
||||
key:"fileSizeString",
|
||||
title:"文件大小",
|
||||
width:"16%",
|
||||
className:"edu-txt-center"
|
||||
},
|
||||
{
|
||||
dataIndex:"createdAt",
|
||||
key:"createdAt",
|
||||
title:"上传时间",
|
||||
}
|
||||
]
|
||||
|
||||
// 确定
|
||||
function submit(){
|
||||
if(fileId){
|
||||
validateFields((error,values)=>{
|
||||
if(!error){
|
||||
postInfo(values);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
showNotification("请先上传文件!");
|
||||
}
|
||||
}
|
||||
|
||||
function postInfo(values){
|
||||
const url = https+`/api/project/achievement/`;
|
||||
if(id){
|
||||
// 修改
|
||||
axios.put(url,{
|
||||
id,fileName,fileId:`${fileId}`,
|
||||
remark:values.remark
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
onOk();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}else{
|
||||
// 上传
|
||||
axios.post(url,{
|
||||
fileId:`${fileId}`,
|
||||
fileName,
|
||||
login:owner,
|
||||
projectId:projectsId,
|
||||
...values
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
onOk();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
}
|
||||
return(
|
||||
<Modal
|
||||
title={id?"更新资源版本":"上传资源"}
|
||||
closable={false}
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
onOk={submit}
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
width="600px"
|
||||
centered
|
||||
>
|
||||
<div>
|
||||
<Form>
|
||||
{id && <Table className="versionTable mb20" columns={columns} dataSource={tableData} pagination={false} size={"small"}/> }
|
||||
<Form.Item style={{display:id?"none":"block"}}>
|
||||
{getFieldDecorator("tagNames",{
|
||||
rules:[]
|
||||
})(
|
||||
<Checkbox.Group>
|
||||
<Checkbox value="软件版本">软件版本</Checkbox>
|
||||
<Checkbox value="文档">文档</Checkbox>
|
||||
<Checkbox value="代码">代码</Checkbox>
|
||||
<Checkbox value="媒体">媒体</Checkbox>
|
||||
<Checkbox value="论文">论文</Checkbox>
|
||||
<Checkbox value="其它">其它</Checkbox>
|
||||
</Checkbox.Group>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Upload
|
||||
className="commentStyle"
|
||||
load={UploadFunc}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
actionUrl= {https}
|
||||
/>
|
||||
<Form.Item className="mt20">
|
||||
{getFieldDecorator("remark",{
|
||||
rules:[]
|
||||
})(
|
||||
<TextArea rows={4} placeholder="请输入资源描述" />
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
export default Form.create()(forwardRef(UploadSource));;
|
|
@ -30,8 +30,8 @@ export default (({projects}) => {
|
|||
projects.map((item, key) => {
|
||||
return (
|
||||
<Div>
|
||||
<Imgs src={item.project && getImageUrl(`images/${item.project.owner_image_url}`)}/>
|
||||
<Link to={`/projects/${item.project.owner_name}/${item.project.identifier}`}>{item.project.name}</Link>
|
||||
<Imgs src={item.project && getImageUrl(`/${item.project.owner_image_url}`)}/>
|
||||
<Link to={`/projects/${item.project.owner_login}/${item.project.identifier}`}>{item.project.name}</Link>
|
||||
</Div>
|
||||
)
|
||||
})
|
||||
|
|
|
@ -84,11 +84,12 @@ export default ((props) => {
|
|||
|
||||
// 移除成员
|
||||
function removeUser(username) {
|
||||
const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/${username}.json`;
|
||||
if (username) {
|
||||
const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/quit.json`;
|
||||
axios.delete(url).then((result) => {
|
||||
if (result && result.data) {
|
||||
|
||||
props.showNotification(`已成功退出团队!`);
|
||||
props.history.push(`/organize/${OIdentifier}`);
|
||||
}
|
||||
}).catch((error) => { });
|
||||
}
|
||||
|
@ -101,7 +102,7 @@ export default ((props) => {
|
|||
group ?
|
||||
<div>
|
||||
<AlignCenterBetween>
|
||||
<span className="color-grey-3">{group.name}</span>
|
||||
<span className="color-grey-3">{group.nickname}</span>
|
||||
{group.is_member && !group.is_admin ?
|
||||
<Popconfirm
|
||||
title="确认离开团队吗?"
|
||||
|
|
|
@ -137,17 +137,39 @@ export default Form.create()(
|
|||
history.push(`/organize/${OIdentifier}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkname(rule, value, callback){
|
||||
if(!value){
|
||||
callback();
|
||||
}
|
||||
if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){
|
||||
callback("只能使用英文字母和数字,以字母开头,长度为4到15个字符");
|
||||
}
|
||||
callback();
|
||||
}
|
||||
return (
|
||||
<Spin spinning={isSpin}>
|
||||
<WhiteBack className="mb30" style={{border:"1px solid #eee"}}>
|
||||
<WhiteBack className="mb30" style={{border:groupId?"none":"1px solid #eee"}}>
|
||||
<Banner>{groupId ? "基本设置" : "新建团队"}</Banner>
|
||||
<Div>
|
||||
<Form>
|
||||
{helper(
|
||||
'团队名称:',
|
||||
'团队标识:',
|
||||
"name",
|
||||
[
|
||||
{ required: true, message: "请输入团队标识" },
|
||||
{
|
||||
validator:checkname
|
||||
}
|
||||
],
|
||||
<Input placeholder="请输入团队标识" disabled={onwers}/>, true
|
||||
)}
|
||||
{helper(
|
||||
'团队名称:',
|
||||
"nickname",
|
||||
[{ required: true, message: "请输入团队名称" }],
|
||||
<Input placeholder="请输入团队名称" disabled={onwers}/>, true
|
||||
<Input placeholder="请输入团队名称"/>, true
|
||||
)}
|
||||
{helper(
|
||||
<span className="mb5">团队描述:<span className="color-grey-8">(描述团队的目的或作用)</span></span>,
|
||||
|
|
|
@ -76,7 +76,7 @@ export default ((props) => {
|
|||
width: "7%",
|
||||
render: (value, item) => {
|
||||
return (
|
||||
<Img src={getImageUrl(`images/${item.user.image_url}`)}></Img>
|
||||
<Img src={getImageUrl(`/${item.user.image_url}`)}></Img>
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -180,7 +180,7 @@ function GroupProjectSetting(props) {
|
|||
}
|
||||
>
|
||||
<List.Item.Meta
|
||||
title={<a href={`/projects/${item.project.owner_name}/${item.project.name}`}>{item.project.owner_name}/{item.project.name}</a>}
|
||||
title={<a href={`/projects/${item.project.owner_login}/${item.project.identifier}`}>{item.project.owner_name}/{item.project.name}</a>}
|
||||
/>
|
||||
</List.Item>
|
||||
)}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import React,{ forwardRef , useCallback , useEffect, useState } from 'react';
|
||||
import './Index.scss';
|
||||
import { Form , Input , Radio , Checkbox , Button, InputNumber } from "antd";
|
||||
import { Form , Input , Radio , Checkbox , Button } from "antd";
|
||||
import UploadImage from './Component/UploadImage';
|
||||
import axios from 'axios';
|
||||
|
||||
const port = window.location.port;
|
||||
const hostname = window.location.hostname;
|
||||
export default Form.create()(
|
||||
forwardRef(({ form , showNotification , history })=>{
|
||||
const [ image , setImage ] = useState(undefined);
|
||||
const [ imageFlag , setImageFlag] = useState(false);
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
|
||||
const radioStyle = {
|
||||
display: 'block',
|
||||
height: '30px',
|
||||
|
@ -60,19 +60,44 @@ export default Form.create()(
|
|||
})
|
||||
},[])
|
||||
|
||||
function checkname(rule, value, callback){
|
||||
if(!value){
|
||||
callback();
|
||||
}
|
||||
if(value && !value.match(/^[a-zA-Z][a-zA-Z0-9_-]{3,19}$/)){
|
||||
callback("只能使用以字母开头,包含字母、数字、下划线、横杠等,长度4到20个字符");
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="main">
|
||||
<div className="main" style={{padding:"0px",border:"none"}}>
|
||||
<div className="teamBox">
|
||||
<p className="teamBox-title">新建组织</p>
|
||||
<Form className="teamBox-form">
|
||||
{helper(
|
||||
<span>组织名称:<span className="color-grey-8">(组织名称应该简单明了)</span></span>,
|
||||
<span>组织账号:</span>,
|
||||
"name",
|
||||
[
|
||||
{ required: true, message: "请输入组织账号" },
|
||||
{
|
||||
validator:checkname
|
||||
}
|
||||
],
|
||||
<Input
|
||||
addonBefore={`https://`+ port ? `${hostname}:${port}/organize`:`${hostname}/organize`}
|
||||
placeholder="组织账号"
|
||||
/>
|
||||
)}
|
||||
{helper(
|
||||
<span>组织名称:</span>,
|
||||
"nickname",
|
||||
[{ required: true, message: "请输入组织名称" }],
|
||||
<Input
|
||||
placeholder="请输入组织名称"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
'组织描述',
|
||||
"description",
|
||||
|
|
|
@ -72,7 +72,7 @@ function RightBox({ OIdentifier , history , admin }) {
|
|||
memberData.organization_users.map((item,key)=>{
|
||||
return(
|
||||
<div className="teammembers" key={key}>
|
||||
<Link to={`/users/${item.user && item.user.login}`}><Img src={getImageUrl(`images/${item.user && item.user.image_url}`)} alt="" className="m-img"/></Link>
|
||||
<Link to={`/users/${item.user && item.user.login}`}><Img src={getImageUrl(`/${item.user && item.user.image_url}`)} alt="" className="m-img"/></Link>
|
||||
<div>
|
||||
<Link to={`/users/${item.user && item.user.login}`}><ListName>{item.user && item.user.name}</ListName></Link>
|
||||
<Align><i className="iconfont icon-shijian color-green mr3 font-13"></i><Span>加入时间:{item.created_at}</Span></Align>
|
||||
|
|
|
@ -95,6 +95,15 @@ export default Form.create()(
|
|||
})
|
||||
setVisible(false);
|
||||
}
|
||||
function checkname(rule, value, callback){
|
||||
if(!value){
|
||||
callback();
|
||||
}
|
||||
if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){
|
||||
callback("只能使用英文字母和数字,以字母开头,长度为4到15个字符");
|
||||
}
|
||||
callback();
|
||||
}
|
||||
return(
|
||||
<div>
|
||||
<WhiteBack>
|
||||
|
@ -102,8 +111,19 @@ export default Form.create()(
|
|||
<Div>
|
||||
<Form>
|
||||
{helper(
|
||||
"组织名称:",
|
||||
"组织账号:",
|
||||
"name",
|
||||
[
|
||||
{ required: true, message: "请输入组织账号" },
|
||||
{
|
||||
validator:checkname
|
||||
}
|
||||
],
|
||||
<Input placeholder="请输入组织账号" />,true
|
||||
)}
|
||||
{helper(
|
||||
"组织名称:",
|
||||
"nickname",
|
||||
[{ required: true, message: "请输入组织名称" }],
|
||||
<Input placeholder="请输入组织名称" />,true
|
||||
)}
|
||||
|
@ -149,7 +169,7 @@ export default Form.create()(
|
|||
<Input value="-1" style={{width:"350px"}}/>
|
||||
)}
|
||||
<p>选择头像:</p>
|
||||
<UploadImage url={getImageUrl(`images/${image}`)} getImage={getImage}/>
|
||||
<UploadImage url={getImageUrl(`/${image}`)} getImage={getImage}/>
|
||||
<Button type={"primary"} onClick={updateDetail}>更新仓库设置</Button>
|
||||
</Form>
|
||||
</Div>
|
||||
|
|
|
@ -64,7 +64,7 @@ export default (({organizeDetail})=>{
|
|||
width:"5%",
|
||||
render:(value)=>{
|
||||
return(
|
||||
value && <Link to={`/users/${value && value.login}`}><Img src={getImageUrl('images/'+value.image_url)}></Img> </Link>
|
||||
value && <Link to={`/users/${value && value.login}`}><Img src={getImageUrl('/'+value.image_url)}></Img> </Link>
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -78,7 +78,7 @@ function Detail(props){
|
|||
detail &&
|
||||
<Cards
|
||||
src={`/organize/${detail.name}`}
|
||||
title={detail.name}
|
||||
title={detail.nickname}
|
||||
desc={!buttonflag && detail.description}
|
||||
img={detail.avatar_url}
|
||||
rightBtn={
|
||||
|
|
|
@ -56,7 +56,7 @@ export default ((props)=>{
|
|||
detail &&
|
||||
<Cards
|
||||
src={`/organize/${OIdentifier}/group/${groupId}`}
|
||||
title={detail.name}
|
||||
title={detail.nickname||detail.name}
|
||||
rightBtn={
|
||||
flag && <span className="subNavs">
|
||||
<Link to={`/organize/${OIdentifier}/member`} className={pathname ===`/organize/${OIdentifier}/member` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
|
||||
|
|
|
@ -75,7 +75,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
|||
return(
|
||||
<div key={key}>
|
||||
<p className="g-head">
|
||||
<Link to={`/organize/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.name}</Link>
|
||||
<Link to={`/organize/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.nickname}</Link>
|
||||
<span>
|
||||
{ item.is_admin && item.authorize!=="owner" && <Popconfirm title={`确定解散团队${item.name}?`} okText="是" cancelText="否" onConfirm={()=>disMissGroup(item.id)}><a className="color-red">解散团队</a></Popconfirm>}
|
||||
{ item.is_member && <LeaveTeam className="ml15" teamID={item.id} onOk={outTeam}/>}
|
||||
|
@ -86,7 +86,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
|||
{
|
||||
item.users && item.users.map((i,k)=>{
|
||||
return(
|
||||
k < count ? <Link to={`/users/${i.login}`}><ImgContent title={i.name} key={k} src={getImageUrl(`images/${i.image_url}`)}/></Link>
|
||||
k < count ? <Link to={`/users/${i.login}`}><ImgContent title={i.name} key={k} src={getImageUrl(`/${i.image_url}`)}/></Link>
|
||||
:
|
||||
k === count ?
|
||||
<Link to={`/organize/${organizeDetail && organizeDetail.name}/group/${item.id}`} className="moreMember" title="查看更多" ><i className="iconfont icon-zhunbeizhong"></i></Link>
|
||||
|
@ -105,7 +105,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
|||
}
|
||||
</div>
|
||||
}
|
||||
{ list && list.length > 0 && <Nodata _html="暂无数据"/> }
|
||||
{ list && list.length === 0 && <Nodata _html="暂无数据"/> }
|
||||
{
|
||||
total > limit &&
|
||||
<div className="mt20 pb20 edu-txt-center">
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, { Component } from "react";
|
||||
import { Upload, Button, Icon } from 'antd';
|
||||
import { Upload, Icon , Button } from 'antd';
|
||||
import { getUploadActionUrl, appendFileSizeToUploadFileAll } from 'educoder';
|
||||
import { AlignCenter } from '../Component/layout';
|
||||
|
||||
import axios from 'axios';
|
||||
const { Dragger } = Upload;
|
||||
|
@ -28,22 +29,12 @@ class Index extends Component {
|
|||
|
||||
onAttachmentRemove = (file) => {
|
||||
if (!file.percent || file.percent === 100) {
|
||||
// this.props.confirm({
|
||||
// content: '是否确认删除?',
|
||||
// onOk: () => {
|
||||
// this.deleteAttachment(file)
|
||||
// },
|
||||
// onCancel() {
|
||||
// console.log('Cancel');
|
||||
// },
|
||||
// });
|
||||
this.deleteAttachment(file)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
deleteAttachment = (file) => {
|
||||
|
||||
const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
|
||||
axios.delete(url, {
|
||||
}).then((response) => {
|
||||
|
@ -82,7 +73,7 @@ class Index extends Component {
|
|||
fileIdList = (fileList) => {
|
||||
let array = [];
|
||||
fileList && fileList.length > 0 && fileList.map((item) => {
|
||||
return array.push(item.response && item.response.id);
|
||||
return array.push(item.response && (item.response.id || (item.response.data && item.response.data.id)));
|
||||
})
|
||||
array && this.props.load && this.props.load(array);
|
||||
}
|
||||
|
@ -98,21 +89,27 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
//判断是否已经提交,如已提交评论则上一条评论数据清除
|
||||
const { isComplete, icon } = this.props;
|
||||
const { isComplete, icon , btn , className , size , actionUrl } = this.props;
|
||||
const { fileList } = this.state;
|
||||
|
||||
let list = isComplete === true ? fileList : undefined;
|
||||
const upload = {
|
||||
name: 'file',
|
||||
fileList: list,
|
||||
action: `${getUploadActionUrl()}`,
|
||||
action: actionUrl || `${getUploadActionUrl()}`,
|
||||
onChange: this.handleChange,
|
||||
onRemove: this.onAttachmentRemove,
|
||||
beforeUpload: this.beforeUpload
|
||||
};
|
||||
|
||||
return (
|
||||
<Dragger {...upload} className={this.props.className}>
|
||||
btn ?
|
||||
<Upload {...upload} className={className}>
|
||||
<Button type={"default"}>上传文件</Button>
|
||||
<span className="ml10 color-grey-9">(你可以上传小于<span className="color-red">{size}MB</span>的文件)</span>
|
||||
</Upload>
|
||||
:
|
||||
<Dragger {...upload} className={className}>
|
||||
{icon || <Icon type="inbox" />}
|
||||
<p className="ant-upload-text font-14">拖动文件或<span className="color-blue">点击此处上传</span></p>
|
||||
</Dragger>
|
||||
|
|
|
@ -5,6 +5,7 @@ import "./list.css";
|
|||
|
||||
function FocusButton({is_watch , fontClass, starText, is_block , id , successFunc}){
|
||||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
const [ watchFlag , setWatchFlag ] = useState(is_watch);
|
||||
// 关注和取消关注
|
||||
function focusFunc(flag){
|
||||
setIsSpin(true);
|
||||
|
@ -18,6 +19,7 @@ function FocusButton({is_watch , fontClass, starText, is_block , id , successFun
|
|||
}).then((result) => {
|
||||
if (result && result.data.status === 0) {
|
||||
successFunc && successFunc();
|
||||
setWatchFlag(!watchFlag);
|
||||
}
|
||||
setIsSpin(false);
|
||||
})
|
||||
|
@ -25,8 +27,8 @@ function FocusButton({is_watch , fontClass, starText, is_block , id , successFun
|
|||
};
|
||||
|
||||
return (
|
||||
<Button type={is_watch ? "default" : "primary"} ghost={!is_watch} block={is_block} loading={isSpin} onClick={() => focusFunc(is_watch)}>
|
||||
{is_watch ? (
|
||||
<Button type={watchFlag ? "default" : "primary"} ghost={!watchFlag} block={is_block} loading={isSpin} onClick={() => focusFunc(watchFlag)}>
|
||||
{watchFlag ? (
|
||||
<span className="">
|
||||
<i className="iconfont icon-shixing font-15 text-yellow mr-4"></i>
|
||||
<span className={fontClass || "font-12"}>已关注</span>
|
||||
|
|
|
@ -88,7 +88,7 @@ class ForkUsers extends Component {
|
|||
>
|
||||
<img
|
||||
className="avatar-60"
|
||||
src={getImageUrl(`images/${item.image_url}`)}
|
||||
src={getImageUrl(`/${item.image_url}`)}
|
||||
alt=""
|
||||
/>
|
||||
</Link>
|
||||
|
|
|
@ -18,7 +18,7 @@ class UserList extends Component {
|
|||
>
|
||||
<img
|
||||
className="avatar-60"
|
||||
src={getImageUrl(`images/${item.image_url}`)}
|
||||
src={getImageUrl(`/${item.image_url}`)}
|
||||
alt=""
|
||||
/>
|
||||
</a>
|
||||
|
|
|
@ -118,7 +118,7 @@ class children_comments extends Component {
|
|||
>
|
||||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(`images/${item && item.user_picture}`)}
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
|
|
|
@ -82,7 +82,7 @@ class children_journals extends Component {
|
|||
>
|
||||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(`images/${item && item.user_picture}`)}
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
|
|
|
@ -310,7 +310,7 @@ class comments extends Component {
|
|||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(
|
||||
`images/${current_user && current_user.image_url}`
|
||||
`/${current_user && current_user.image_url}`
|
||||
)}
|
||||
alt=""
|
||||
width="30"
|
||||
|
@ -375,7 +375,7 @@ class comments extends Component {
|
|||
>
|
||||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(`images/${item && item.user_picture}`)}
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
|
@ -471,7 +471,7 @@ class comments extends Component {
|
|||
className="radius"
|
||||
src={
|
||||
current_user && current_user.image_url
|
||||
? getImageUrl(`images/${current_user.image_url}`)
|
||||
? getImageUrl(`/${current_user.image_url}`)
|
||||
: "images/avatars/User/b"
|
||||
}
|
||||
alt=""
|
||||
|
@ -528,7 +528,7 @@ class comments extends Component {
|
|||
className="radius"
|
||||
src={
|
||||
current_user && current_user.image_url
|
||||
? getImageUrl(`images/${current_user.image_url}`)
|
||||
? getImageUrl(`/${current_user.image_url}`)
|
||||
: "images/avatars/User/b"
|
||||
}
|
||||
alt=""
|
||||
|
|
|
@ -3,6 +3,7 @@ ul,ol,dl{
|
|||
}
|
||||
.newMain{
|
||||
background-color: #fff;
|
||||
padding-bottom: 810px;
|
||||
}
|
||||
.color-black{
|
||||
color: #333;
|
||||
|
|
|
@ -6,7 +6,6 @@ import { withRouter } from "react-router";
|
|||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import Handbook from '../Component/Handbook';
|
||||
const Infos = Loadable({
|
||||
loader: () => import("./Infos"),
|
||||
loading: Loading,
|
||||
|
@ -15,7 +14,6 @@ export default withRouter(
|
|||
(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{
|
||||
return(
|
||||
<div>
|
||||
<Handbook />
|
||||
<Switch>
|
||||
<Route
|
||||
path="/users/:username"
|
||||
|
|
|
@ -150,7 +150,7 @@ class Infos extends Component {
|
|||
<div className="list-l-Menu text-center pd20 ">
|
||||
<Avatar
|
||||
size={110}
|
||||
src={getImageUrl(`images/${user && user.image_url}`)}
|
||||
src={getImageUrl(`/${user && user.image_url}`)}
|
||||
/>
|
||||
{user && user.user_identity && (
|
||||
<div className="mt-n15 position-relative">
|
||||
|
|
|
@ -4,7 +4,7 @@ import { getImageUrl } from 'educoder';
|
|||
function TeamItem({item,history}){
|
||||
return(
|
||||
<div onClick={()=>{history.push(`/organize/${item.name}`)}} style={{cursor:"pointer"}}>
|
||||
<div className="imgBox"><img alt="" src={getImageUrl(`images/${item.avatar_url}`)}/></div>
|
||||
<div className="imgBox"><img alt="" src={getImageUrl(`/${item.avatar_url}`)}/></div>
|
||||
<div style={{flex:'1'}}>
|
||||
<span className="mb5 font-18 color-grey-3 task-hide">{item.name}</span>
|
||||
<div className="task-hide-2">
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -67,17 +67,6 @@ li {
|
|||
font-size: 25px !important;
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #323232;
|
||||
clear: both;
|
||||
min-width: 1200px;
|
||||
z-index: 8;
|
||||
left: 0px;
|
||||
max-height: 110px;
|
||||
}
|
||||
|
||||
.markdown-body {
|
||||
text-align: justify;
|
||||
|
|
|
@ -16,7 +16,7 @@ class http500 extends Component {
|
|||
<div className="newMain clearfix">
|
||||
<div className=" edu-txt-center mt60 mb60">
|
||||
{/*mt100 mb100*/}
|
||||
<img src={getImageUrl("images/warn/pic_404.jpg")} />
|
||||
<img src={getImageUrl("/images/warn/pic_404.jpg")} />
|
||||
<p className="font-18 mt40">
|
||||
您可以稍后尝试 <a href="/"
|
||||
className="color-blue">返回首页</a>
|
||||
|
|
|
@ -78,7 +78,7 @@ class CompetitionsIndex extends Component{
|
|||
.courses-head{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
background-image: url(${getImageUrl(this.props.mygetHelmetapi && this.props.mygetHelmetapi.competition_banner_url === null ?`images/educoder/competitions/courses.jpg`:this.props.mygetHelmetapi&&this.props.mygetHelmetapi.competition_banner_url)});
|
||||
background-image: url(${getImageUrl(this.props.mygetHelmetapi && this.props.mygetHelmetapi.competition_banner_url === null ?`/images/educoder/competitions/courses.jpg`:this.props.mygetHelmetapi&&this.props.mygetHelmetapi.competition_banner_url)});
|
||||
background-color: #081C4B;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
|
|
|
@ -358,10 +358,10 @@ class CompetitionCommon extends Component{
|
|||
data && data.permission.editable === true ? "" :
|
||||
<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div> : ""}
|
||||
<img className={"Commonimg"}
|
||||
src={data.competition_status === "ended" ? getImageUrl(`images/educoder/competitions/groups1.png`) : data.competition_status === "nearly_published" ? getImageUrl(`images/educoder/competitions/groups2.png`) : data.competition_status === "progressing" ? getImageUrl(`images/educoder/competitions/groups3.png`) : ""}/>
|
||||
src={data.competition_status === "ended" ? getImageUrl(`/images/educoder/competitions/groups1.png`) : data.competition_status === "nearly_published" ? getImageUrl(`images/educoder/competitions/groups2.png`) : data.competition_status === "progressing" ? getImageUrl(`images/educoder/competitions/groups3.png`) : ""}/>
|
||||
<Col span={15} className={"Commonimgbox"}>
|
||||
<img className={"image_urlbox"}
|
||||
src={data === undefined ? getImageUrl(`images/educoder/competitions/mainbanner.jpg`) : data.avatar_url === null ? getImageUrl(`images/educoder/competitions/mainbanner.jpg`) : getImageUrl(data.avatar_url)}/>
|
||||
src={data === undefined ? getImageUrl(`/images/educoder/competitions/mainbanner.jpg`) : data.avatar_url === null ? getImageUrl(`/images/educoder/competitions/mainbanner.jpg`) : getImageUrl(data.avatar_url)}/>
|
||||
</Col>
|
||||
<Col className={"CompetitionCommonbannerfont"} span={9}>
|
||||
|
||||
|
|
|
@ -249,11 +249,11 @@ class CompetitionContents extends Component{
|
|||
cover={
|
||||
<div className={"Competitionfirstbox center"}>
|
||||
<li className="pr Competitioncenter">
|
||||
<img src={getImageUrl("images/educoder/huangguan.png")}/>
|
||||
<img src={getImageUrl("/images/educoder/huangguan.png")}/>
|
||||
<div className={"mt10"}>
|
||||
<a href={`/users/${item.user_login}`} target={"_blank"} className="color-dark">
|
||||
<div className={"relativef"}>
|
||||
<img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
|
||||
<img className={"rankingimg"} src={getImageUrl(`/images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
|
||||
<div className={"competimgabsolute"}><Badge count={item.competition_prize} style={{ backgroundColor: '#459BE5' }} title={item.competition_prize}/></div>
|
||||
</div>
|
||||
<p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p>
|
||||
|
|
|
@ -171,7 +171,7 @@ class CoursesHome extends Component {
|
|||
coursesHomelist={coursesHomelist}></CoursesHomeCard>}
|
||||
|
||||
{coursesHomelist === undefined ? "" : coursesHomelist.courses.length === 0 ? <div className="edu-tab-con-box clearfix edu-txt-center mb50">
|
||||
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")} />
|
||||
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")} />
|
||||
<p className="edu-nodata-p mb20">暂时还没有相关数据哦!</p>
|
||||
</div> : ""}
|
||||
|
||||
|
|
|
@ -1366,10 +1366,6 @@ samp {
|
|||
line-height: 40px;
|
||||
}
|
||||
|
||||
.courseForm .ant-input-group>.ant-input:first-child,
|
||||
.ant-input-group-addon:first-child {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.courseForm .ant-select-selection,
|
||||
.courseForm .ant-select-selection-selected-value {
|
||||
|
@ -1722,12 +1718,6 @@ samp {
|
|||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.ant-input-group-addon {
|
||||
color: #666 !important;
|
||||
font-size: 12px;
|
||||
border: 1px solid #d9d9d9 !important;
|
||||
border-left: none !important;
|
||||
}
|
||||
|
||||
.check_on {
|
||||
background: #4CACFF;
|
||||
|
|
|
@ -295,7 +295,7 @@ class Listofworksstudentone extends Component {
|
|||
计算规则:<br/>
|
||||
学员离开实训学习界面停止计时;<br/>
|
||||
评测首次通过之后,停止计时<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'cost_time',
|
||||
key: 'cost_time',
|
||||
align: 'center',
|
||||
|
@ -381,7 +381,7 @@ class Listofworksstudentone extends Component {
|
|||
title:<span>关卡得分<Tooltip placement="top" title={<pre>
|
||||
计算规则:<br/>
|
||||
截止前学员完成的关卡才有成绩<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'final_score',
|
||||
key: 'final_score',
|
||||
align: 'center',
|
||||
|
@ -420,7 +420,7 @@ class Listofworksstudentone extends Component {
|
|||
学生工作效率= log(实训总得分/实训总耗时)<br/>
|
||||
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
|
||||
工作效率 * 分值<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'efficiencyscore',
|
||||
key: 'efficiencyscore',
|
||||
align: 'center',
|
||||
|
@ -694,7 +694,7 @@ class Listofworksstudentone extends Component {
|
|||
计算规则:<br/>
|
||||
学员离开实训学习界面停止计时;<br/>
|
||||
评测首次通过之后,停止计时<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'cost_time',
|
||||
key: 'cost_time',
|
||||
align: 'center',
|
||||
|
@ -780,7 +780,7 @@ class Listofworksstudentone extends Component {
|
|||
title:<span>关卡得分<Tooltip placement="top" title={<pre>
|
||||
计算规则:<br/>
|
||||
截止前学员完成的关卡才有成绩<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'final_score',
|
||||
key: 'final_score',
|
||||
align: 'center',
|
||||
|
@ -819,7 +819,7 @@ class Listofworksstudentone extends Component {
|
|||
学生工作效率= log(实训总得分/实训总耗时)<br/>
|
||||
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
|
||||
工作效率 * 分值<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'efficiencyscore',
|
||||
key: 'efficiencyscore',
|
||||
align: 'center',
|
||||
|
@ -1050,7 +1050,7 @@ class Listofworksstudentone extends Component {
|
|||
计算规则:<br/>
|
||||
学员离开实训学习界面停止计时;<br/>
|
||||
评测首次通过之后,停止计时<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'cost_time',
|
||||
key: 'cost_time',
|
||||
align: 'center',
|
||||
|
@ -1134,7 +1134,7 @@ class Listofworksstudentone extends Component {
|
|||
title:<span>关卡得分<Tooltip placement="top" title={<pre>
|
||||
计算规则:<br/>
|
||||
截止前学员完成的关卡才有成绩<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'final_score',
|
||||
key: 'final_score',
|
||||
align: 'center',
|
||||
|
@ -1167,7 +1167,7 @@ class Listofworksstudentone extends Component {
|
|||
学生工作效率= log(实训总得分/实训总耗时)<br/>
|
||||
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
|
||||
工作效率 * 分值<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'efficiencyscore',
|
||||
key: 'efficiencyscore',
|
||||
align: 'center',
|
||||
|
@ -1210,7 +1210,7 @@ class Listofworksstudentone extends Component {
|
|||
title: <span>当前成绩<Tooltip placement="top"title={<pre>
|
||||
鼠标停留具体分值上可查<br/>
|
||||
看得分明细<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'work_score',
|
||||
key: 'work_score',
|
||||
align: 'center',
|
||||
|
@ -1461,7 +1461,7 @@ class Listofworksstudentone extends Component {
|
|||
计算规则:<br/>
|
||||
学员离开实训学习界面停止计时;<br/>
|
||||
评测首次通过之后,停止计时<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'cost_time',
|
||||
key: 'cost_time',
|
||||
align: 'center',
|
||||
|
@ -1524,7 +1524,7 @@ class Listofworksstudentone extends Component {
|
|||
title:<span>关卡得分<Tooltip placement="top" title={<pre>
|
||||
计算规则:<br/>
|
||||
截止前学员完成的关卡才有成绩<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'final_score',
|
||||
key: 'final_score',
|
||||
align: 'center',
|
||||
|
@ -1557,7 +1557,7 @@ class Listofworksstudentone extends Component {
|
|||
学生工作效率= log(实训总得分/实训总耗时)<br/>
|
||||
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
|
||||
工作效率 * 分值<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'efficiencyscore',
|
||||
key: 'efficiencyscore',
|
||||
align: 'center',
|
||||
|
@ -1600,7 +1600,7 @@ class Listofworksstudentone extends Component {
|
|||
title: <span>当前成绩<Tooltip placement="top" title={<pre>
|
||||
鼠标停留具体分值上可查<br/>
|
||||
看得分明细<br/>
|
||||
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
|
||||
dataIndex: 'work_score',
|
||||
key: 'work_score',
|
||||
align: 'center',
|
||||
|
@ -3898,7 +3898,7 @@ class Listofworksstudentone extends Component {
|
|||
<div id="forum_list" className="forum_table">
|
||||
<div className="mh650 edu-back-white">
|
||||
<div className="edu-tab-con-box clearfix edu-txt-center">
|
||||
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
|
||||
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")}/>
|
||||
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4175,7 +4175,7 @@ class Listofworksstudentone extends Component {
|
|||
<div className="mh650 edu-back-white">
|
||||
<div className="edu-tab-con-box clearfix edu-txt-center">
|
||||
<img className="edu-nodata-img mb20"
|
||||
src={getImageUrl("images/educoder/nodata.png")}/>
|
||||
src={getImageUrl("/images/educoder/nodata.png")}/>
|
||||
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4409,7 +4409,7 @@ class Listofworksstudentone extends Component {
|
|||
<div className="mh650 edu-back-white">
|
||||
<div className="edu-tab-con-box clearfix edu-txt-center">
|
||||
<img className="edu-nodata-img mb20"
|
||||
src={getImageUrl("images/educoder/nodata.png")}/>
|
||||
src={getImageUrl("/images/educoder/nodata.png")}/>
|
||||
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -514,7 +514,7 @@ class ShixunWorkReport extends Component {
|
|||
|
||||
<div className="fl edu-back-white ml10 ">
|
||||
<img alt="头像" className="radius" height="91" id="nh_user_logo" name="avatar_image"
|
||||
src={ getImageUrl(`images/${data&&data.image_url}`)}
|
||||
src={ getImageUrl(`/${data&&data.image_url}`)}
|
||||
width="91"/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ class ShixunWorkModal extends Component{
|
|||
<div id="forum_list" className="forum_table">
|
||||
<div className=" edu-back-white">
|
||||
<div className="edu-tab-con-box clearfix edu-txt-center">
|
||||
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
|
||||
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")}/>
|
||||
<p className="edu-nodata-p mb30">暂时还没有相关数据哦!</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import React, {Component} from "react";
|
||||
import React, { Component } from "react";
|
||||
import moment from 'moment';
|
||||
import { SnackbarHOC,getImageUrl } from 'educoder';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import '../courses/css/members.css';
|
||||
import "../courses/common/formCommon.css"
|
||||
import '../courses/css/Courses.css';
|
||||
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
|
||||
import educodernet from '../../../src/images/login/educodernet.png';
|
||||
import educodernet from '../../../src/images/login/logo.png';
|
||||
import LoginRegisterComponent from '../user/LoginRegisterComponent';
|
||||
import FindPasswordComponent from '../user/FindPasswordComponent';
|
||||
import passopen from "../../images/login/passopen.png";
|
||||
|
@ -119,87 +119,39 @@ class EducoderLogin extends Component {
|
|||
|
||||
|
||||
render() {
|
||||
let {showbool,loginstatus,logini} = this.state;
|
||||
// console.log("EducoderLogingetHelmetapi");
|
||||
// console.log(this.props);
|
||||
// console.log(this.props.mygetHelmetapi);
|
||||
let { showbool } = this.state;
|
||||
const { settings } = this.props;
|
||||
return (
|
||||
<div style={newContainer} className=" clearfix" >
|
||||
|
||||
<div >
|
||||
<div style={{
|
||||
"display": "flex",
|
||||
"justify-content": "center",
|
||||
"align-items": "center",
|
||||
"width": "100%"
|
||||
}}>
|
||||
<div style={{cursor:"pointer"}}>
|
||||
{this.props.mygetHelmetapi === null ? ""
|
||||
:
|
||||
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.login_logo_url===null|| this.props.mygetHelmetapi.login_logo_url===undefined?
|
||||
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={educodernet}/>
|
||||
:
|
||||
<img style={{cursor:"pointer"}} onClick={()=>this.gohome()} src={getImageUrl(this.props.mygetHelmetapi.login_logo_url)}/>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div style={{"justify-content": "center","align-items": "center","width": "100%",textAlign:"center"}}>
|
||||
<div style={{cursor:"pointer"}}>
|
||||
{
|
||||
settings && settings.login_logo_url ?
|
||||
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} width="80px" src={getImageUrl(settings.login_logo_url)}/>
|
||||
:
|
||||
<img style={{cursor:"pointer"}} alt="" onClick={()=>this.gohome()} src={educodernet} width="80px"/>
|
||||
}
|
||||
</div>
|
||||
{
|
||||
showbool === 1 ?
|
||||
<div style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
marginTop: "25px",
|
||||
}}>
|
||||
<div>
|
||||
|
||||
<LoginRegisterComponent {...this.props} {...this.state}
|
||||
Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
|
||||
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
marginTop: "25px",
|
||||
}}>
|
||||
<div>
|
||||
<LoginRegisterComponent {...this.props} {...this.state} Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
|
||||
</div>
|
||||
</div>
|
||||
:
|
||||
<div style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
marginTop: "25px",
|
||||
}}>
|
||||
<div >
|
||||
<FindPasswordComponent {...this.props} {...this.state}
|
||||
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style={{display: "flex",justifyContent: "center",width: "100%",marginTop: "25px",}}>
|
||||
<div>
|
||||
<FindPasswordComponent {...this.props} {...this.state} Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
{this.props.mygetHelmetapi === null ? <div style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
}}>
|
||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
||||
</div>:
|
||||
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined? <div style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
}}>
|
||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
||||
</div>:this.props.mygetHelmetapi.main_site===true?
|
||||
<div style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
}}>
|
||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
||||
</div>
|
||||
:""
|
||||
}
|
||||
|
||||
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span> {moment().year()} EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import Dialog, {
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
} from 'material-ui/Dialog';
|
||||
import { notification, Modal } from 'antd';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import { notification } from 'antd';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
|
@ -329,6 +323,7 @@ class LoginDialog extends Component {
|
|||
return flag;
|
||||
}
|
||||
componentDidMount() {
|
||||
|
||||
let flag = this.IsPC(); //true为PC端,false为手机端
|
||||
this.setState({
|
||||
isphone: flag
|
||||
|
@ -475,9 +470,10 @@ class LoginDialog extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
let { qqlogin, login, isGoing, isGoingValue, disabled, bottonclass, Phonenumberisnotco,
|
||||
let { login, isGoing, isGoingValue, disabled, Phonenumberisnotco,
|
||||
dialogBox, isRender, weixinlogin } = this.state;
|
||||
|
||||
let { settings } = this.props;
|
||||
if (isRender === undefined) {
|
||||
isRender = false
|
||||
}
|
||||
|
@ -580,9 +576,9 @@ class LoginDialog extends Component {
|
|||
<label htmlFor="p_autolog" style={{ top: '0px' }}>下次自动登录</label>
|
||||
</span>
|
||||
<span className="fr">
|
||||
<a onClick={(url) => this.getloginurl("https://www.trustie.net/account/lost_password")}
|
||||
className="mr3 color-grey-9">找回密码</a><em className="vertical-line"></em>
|
||||
<a onClick={(url) => this.getloginurl("https://www.trustie.net/login?login=false")} className="color-grey-9">注册</a>
|
||||
<a onClick={(url) => this.getloginurl(`${settings && settings.common && settings.common.lost_password}`)} className="mr3 color-grey-9">找回密码</a>
|
||||
<em className="vertical-line"></em>
|
||||
<a onClick={(url) => this.getloginurl(`${settings && settings.common && settings.common.register}`)} className="color-grey-9">注册</a>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ class Messagerouting extends Component{
|
|||
<a >
|
||||
{
|
||||
this.props.current_user!== undefined?
|
||||
<img className="person radius myw120 myh120" src={getImageUrl("images/"+this.props.current_user.image_url)}/>
|
||||
<img className="person radius myw120 myh120" src={getImageUrl("/images/"+this.props.current_user.image_url)}/>
|
||||
:""
|
||||
}
|
||||
|
||||
|
|
|
@ -32,9 +32,6 @@ class Bottomsubmit extends Component {
|
|||
<style>
|
||||
{
|
||||
`
|
||||
.newFooter{
|
||||
display:none;
|
||||
}
|
||||
.newshixunbottombtn {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
|
|
|
@ -1068,11 +1068,6 @@ class NewMyShixunModel extends Component {
|
|||
<style>
|
||||
{
|
||||
`
|
||||
.newHeaders{
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
z-index: 999 !important;
|
||||
}
|
||||
.ant-drawer {
|
||||
z-index: 800 !important;
|
||||
}
|
||||
|
|
|
@ -379,16 +379,6 @@ class Paperreview extends Component {
|
|||
""
|
||||
}
|
||||
|
||||
<style>
|
||||
{
|
||||
`
|
||||
|
||||
.newFooter{
|
||||
display: none;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<div className="w1200ms">
|
||||
<div className="w100s mt30">
|
||||
{
|
||||
|
|
|
@ -534,9 +534,6 @@ class Questionitem_banks extends Component {
|
|||
width: 100%!important;
|
||||
|
||||
}
|
||||
.newFooter{
|
||||
display: none;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -379,16 +379,6 @@ class Intecomponents extends Component {
|
|||
<div>
|
||||
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
|
||||
>
|
||||
<style>
|
||||
{
|
||||
`
|
||||
|
||||
.newFooter{
|
||||
display: none;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<div className="w1200ms">
|
||||
<div className="w100s mt30">
|
||||
<Breadcrumb separator=">">
|
||||
|
|
|
@ -241,17 +241,6 @@ class Paperlibraryeditid extends Component {
|
|||
:
|
||||
""
|
||||
}
|
||||
|
||||
<style>
|
||||
{
|
||||
`
|
||||
|
||||
.newFooter{
|
||||
display: none;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<div className="w1200ms">
|
||||
<div className="w100s mt30">
|
||||
<Breadcrumb separator=">">
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue