diff --git a/public/react/src/App.css b/public/react/src/App.css index 7b0455bea..50bccfb60 100644 --- a/public/react/src/App.css +++ b/public/react/src/App.css @@ -58,4 +58,9 @@ html, body { /* resize */ .editormd .CodeMirror { border-right: none !important; +} +.editormd-preview { + border-left: 1px solid rgb(221, 221, 221); + /* 某些情况下,被cm盖住了 */ + z-index: 99; } \ No newline at end of file diff --git a/public/react/src/common/components/LinkAfterLogin.js b/public/react/src/common/components/LinkAfterLogin.js new file mode 100644 index 000000000..d0df08f0a --- /dev/null +++ b/public/react/src/common/components/LinkAfterLogin.js @@ -0,0 +1,23 @@ +import React, { Component } from 'react'; + +// 登录后才能跳转 +class LinkAfterLogin extends Component { + + constructor(props) { + super(props); + } + checkAuth = () => { + if (this.props.checkIfLogin()) { + this.props.history.push(this.props.to) + } else { + this.props.showLoginDialog() + } + } + render() { + return( + {this.props.children} + ) + } +} + +export default LinkAfterLogin; \ No newline at end of file diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 2afbca8d1..2074e495a 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -36,6 +36,7 @@ export { ModalHOC } from './components/ModalHOC' export { SetAppModel } from './components/SetAppModel' +export { default as LinkAfterLogin } from './components/LinkAfterLogin' export { default as Cropper } from './components/Cropper' export { default as ConditionToolTip } from './components/ConditionToolTip' export { default as DragValidator } from './components/DragValidator' diff --git a/public/react/src/modules/comment/CommentContainer.js b/public/react/src/modules/comment/CommentContainer.js index 0e12d0e7d..b02f4094f 100644 --- a/public/react/src/modules/comment/CommentContainer.js +++ b/public/react/src/modules/comment/CommentContainer.js @@ -15,6 +15,7 @@ class CommentContainer extends Component { diff --git a/public/react/src/modules/comment/Comments.js b/public/react/src/modules/comment/Comments.js index 380b90bd9..ae246197c 100644 --- a/public/react/src/modules/comment/Comments.js +++ b/public/react/src/modules/comment/Comments.js @@ -58,6 +58,9 @@ const _origin = window.location.origin; comment_count_without_reply currentPage comments + + showRewardButton 是否显示奖励按钮 + showHiddenButton 是否显示隐藏按钮 接口 deleteComment 删除 @@ -360,7 +363,8 @@ class Comments extends Component { :""} - { (this.props.onlySuperAdminCouldHide && item.isSuperAdmin || !this.props.onlySuperAdminCouldHide && item.admin === true) ? + { this.props.showHiddenButton == true + && (this.props.onlySuperAdminCouldHide && item.isSuperAdmin || !this.props.onlySuperAdminCouldHide && item.admin === true) ? this.onCommentBtnClick(item, '', item.hidden ? 'hiddenCancel' : 'hidden') }> diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 970cf798a..d60c34461 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -648,7 +648,10 @@ class TopicDetail extends Component {
- {memo.is_md == true ? : + {/* */} + {memo.is_md == true ? + + :
}
diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index d146b5ef4..4075eff03 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { WordsBtn } from 'educoder'; +import { WordsBtn, getTaskUrlById } from 'educoder'; import {Tooltip,message,Modal,Spin} from 'antd'; import {Link} from 'react-router-dom'; import axios from 'axios'; @@ -44,6 +44,11 @@ class Startshixuntask extends Component{ startbtn:false }) }else{ + setTimeout(() => { + this.setState({ + startbtn: false, + }) + }, 1000) if(response.data.status!=401&&response.data.status!=403){ const w=window.open('about:blank'); @@ -156,13 +161,31 @@ class Startshixuntask extends Component{ {/*
知道了*/} {/*

*/} - + + {/* 如果是继续实战和查看实战,实训作业这边,后台会直接返回identity,直接写成a标签 */} {this.props.isStudent? - {this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}> - {this.props.data&&this.props.data.task_operation[0]} - :"开启中":""} - :"" + {this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false + ? + ((this.props.data && this.props.data.task_operation[1] && this.props.data.task_operation[1].indexOf('/') == -1) ? + + {this.props.data.task_operation[0]} + + : + this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}> + {this.props.data&&this.props.data.task_operation[0]} + ) + :"开启中":""} + + :"" } diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index 728d86f96..69c88eb38 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -130,10 +130,11 @@ class CommitSummary extends Component{ height:'20px' }} >
-

+

this.gotohome()}>{data === undefined ? "" :data.course_name===undefined?"": data.course_name} > - {data === undefined ? "" :data.category===undefined?"":data.category.category_name} > 作业详情 @@ -142,7 +143,7 @@ class CommitSummary extends Component{

-

修改总结

+

{this.state.description ? '修改总结' : '提交总结'}

this.gotohome()} className="color-grey-6 fr font-16 ml30 mt10">返回
{/*educontentbox*/} diff --git a/public/react/src/modules/forums/MemoDetail.js b/public/react/src/modules/forums/MemoDetail.js index 8441a8ac9..e08f321a4 100644 --- a/public/react/src/modules/forums/MemoDetail.js +++ b/public/react/src/modules/forums/MemoDetail.js @@ -189,11 +189,17 @@ class MemoDetail extends Component { let filesize = item.filesize attachments.push( -

- - {fileName}{filesize? ` ${filesize}` : ''} +

+ + -

+ 30 ? fileName : ''} + className="mr12 color9B9B overflowHidden1" length="58" style={{maxWidth: '480px'}}> + {fileName} + + {filesize} + +
) }) return attachments; @@ -693,7 +699,7 @@ class MemoDetail extends Component {
{/* overflowHidden1 */} - {memo.subject + memo.subject} + {memo.subject} { memo.sticky && 置顶} @@ -768,6 +774,7 @@ class MemoDetail extends Component {
{ !memo.is_md ?
: +