1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 22:01:06 +00:00

Table icon size modify (#2816)

* repair img tag error bug

* set img size by tag inline style

* delete unnessary css style
This commit is contained in:
杨顺强
2019-01-11 15:37:02 +08:00
committed by llj
parent 1c4f48eef3
commit 5fd87ff6f1
15 changed files with 77 additions and 30 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import moment from 'moment';
import { Tooltip } from 'reactstrap';
import { siteRoot, lang } from '../../utils/constants';
import { Utils } from '../../utils/utils';
moment.locale(lang);
const propTypes = {
@@ -101,9 +102,12 @@ class ReviewListItem extends React.Component {
let localTime = moment.utc(item.updated_at).toDate();
localTime = moment(localTime).fromNow();
let size = Utils.isHiDPI() ? 48 : 24;
let iconUrl = Utils.getFileIconUrl(fileName, size);
return (
<tr className={this.state.highlight} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<td className="text-center" style={{width: '4%'}}><img className="icon" src={siteRoot + 'media/img/file/192/txt.png'} alt="icon"/></td>
<td className="text-center" style={{width: '4%'}}><img src={iconUrl} width="24" alt="" /></td>
<td style={{width: '26%'}}><a href={reviewUrl} target="_blank">{fileName}</a></td>
<td className='library' style={{width: '25%'}}>{item.draft_origin_repo_name}</td>
<td className="update" style={{width: '20%'}}>{localTime}</td>