dev_admin
hjm 6 years ago
parent 5b9826bcd6
commit 81950a771b

@ -14,7 +14,7 @@ import moment from 'moment'
import Comments from '../comment/Comments'
import update from 'immutability-helper'
import Tooltip from 'material-ui/Tooltip';
// import Tooltip from 'material-ui/Tooltip';
import RewardDialog from '../common/RewardDialog';
import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC'
@ -23,6 +23,7 @@ import MemoDetailKEEditor from './MemoDetailKEEditor'
import MemoDetailMDEditor from './MemoDetailMDEditor'
import { bytesToSize } from 'educoder'
import { Tooltip } from 'antd'
const $ = window.$
function urlStringify(params) {
let noParams = true;
@ -691,15 +692,23 @@ class MemoDetail extends Component {
<div id="forum_list" className="forum_table mh650">
<div className="padding40-30 bor-bottom-greyE">
<div className="font-16 mb5 cdefault clearfix pr pr35" style={{display: 'flex', alignItems: 'center'}}>
<span className="noteDetailTitle">{memo.subject}</span>
{ memo.sticky && <span className="btn-cir btn-cir-red ml10 " style={{ height: '20px' }}>置顶</span>}
{ !!memo.reward && <span className="color-orange font-14 ml15"
data-tip-down={`获得平台奖励金币:${memo.reward}`} >
<i className="iconfont icon-gift mr5"></i>
<span style={{ 'vertical-align': 'sub' }}>{memo.reward}</span>
</span> }
<div style={{ flex: 1 }}>
{/* overflowHidden1 */}
<span className="noteDetailTitle " style={{maxWidth: '634px'}}>{memo.subject + memo.subject}</span>
{ memo.sticky && <span className="btn-cir btn-cir-red ml10 "
style={{ height: '20px', alignSelf: 'flex-start', marginTop: '10px' }}
>置顶</span>}
{ !!memo.reward &&
<Tooltip title={`获得平台奖励金币:${memo.reward}`}>
<span className="color-orange font-14 ml15"
style={{ height: '20px', alignSelf: 'flex-start', marginTop: '1px' }}
>
<i className="iconfont icon-gift mr5"></i>
<span style={{ 'vertical-align': 'sub' }}>{memo.reward}</span>
</span>
</Tooltip>
}
<div style={{ flex: 1, alignSelf: 'flex-start' }}>
{ _current_user && (_current_user.admin === true || _current_user.user_id === author_info.user_id) &&
<div className="edu-position-hidebox" style={{position: 'absolute', right: '12px',top:'4px'}}>
<a href="javascript:void(0);"><i className="fa fa-bars font-16"></i></a>

@ -17,16 +17,22 @@ import PostItem from './PostItem'
import ForumsNavTab from './ForumsNavTab'
import { queryString } from 'educoder'
import { queryString, ThemeContext } from 'educoder'
class MemoList extends Component {
render() {
const { match, history, currentPage, memo_count ,memo_list, renderMemoList, onPaginationChange } = this.props
let theme = this.context;
return (
<React.Fragment>
<div id="forum_list" className="forum_table">
<style>{`
.forum_table_item .item_name:hover {
color: ${theme.foreground_select}
}
`}</style>
<div className="mh650 edu-back-white">
{!memo_list || memo_list.length === 0 ?
<div className="edu-tab-con-box clearfix edu-txt-center">
@ -49,5 +55,6 @@ class MemoList extends Component {
);
}
}
MemoList.contextType = ThemeContext;
export default ( MemoList );

@ -7,10 +7,12 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { getImageUrl, toPath } from 'educoder';
import { getImageUrl, toPath, ThemeContext } from 'educoder';
import moment from 'moment';
import { Tooltip } from 'antd'
class PostItem extends Component {
_toTenThousand(num) {
@ -31,17 +33,19 @@ class PostItem extends Component {
<div className="fl pr" style={{flex: 1}}>
<p className="font-16 clearfix" style={{ lineHeight: 2 }}>
{/* target="_blank" */}
<a href={`/forums/${memo.id}`} target="_blank" title={memo.subject}
className="clearfix task-hide item_name fl" style={{maxWidth: '750px'}} >
<a href={`/forums/${memo.id}`} target="_blank" title={memo.subject && memo.subject.length > 46 ? memo.subject : ''}
className="clearfix task-hide item_name fl" style={{maxWidth: '600px'}} >
{memo.subject}
</a>
{ memo.sticky && <span className="btn-top btn-cir-orange mt6 ml5 fl">置顶</span> }
{ memo.reward &&
<span className=" ml10 fl color-orange03 fl" data-tip-down={`获得平台奖励金币:${memo.reward}`}>
<i className="iconfont icon-gift font-16 mr5 fl"></i><span className="fl mt3 font-14">{memo.reward}</span>
</span>
<Tooltip title={`获得平台奖励金币:${memo.reward}`}>
<span className=" ml10 fl color-orange03 fl" >
<i className="iconfont icon-gift font-16 mr5 fl"></i><span className="fl mt3 font-14">{memo.reward}</span>
</span>
</Tooltip>
}
</p>
@ -101,4 +105,6 @@ class PostItem extends Component {
);
}
}
PostItem.contextType = ThemeContext;
export default PostItem

Loading…
Cancel
Save