mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 14:21:23 +00:00
Repair eslint wraning (#2453)
This commit is contained in:
@@ -6,7 +6,9 @@ import { siteRoot, lang } from '../../utils/constants';
|
||||
moment.locale(lang);
|
||||
const propTypes = {
|
||||
isItemFreezed: PropTypes.bool.isRequired,
|
||||
}
|
||||
item: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
class ReviewListItem extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -34,13 +36,12 @@ class ReviewListItem extends React.Component {
|
||||
|
||||
onReviewsClick = () => {
|
||||
let item = this.props.item;
|
||||
let filePath = item.draft_file_path;
|
||||
let itemID = item.id;
|
||||
window.open(siteRoot + 'drafts/review/' + itemID);
|
||||
}
|
||||
|
||||
getFileName(filePath) {
|
||||
let lastIndex = filePath.lastIndexOf("/");
|
||||
let lastIndex = filePath.lastIndexOf('/');
|
||||
return filePath.slice(lastIndex+1);
|
||||
}
|
||||
|
||||
@@ -52,11 +53,11 @@ class ReviewListItem extends React.Component {
|
||||
|
||||
return (
|
||||
<tr className={this.state.highlight} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
||||
<td className="icon" style={{width: "4%"}}><img src={siteRoot + "media/img/file/192/txt.png"} /></td>
|
||||
<td className="name a-simulate" style={{width: "46%"}} onClick={this.onReviewsClick}>{fileName}</td>
|
||||
<td className="icon" style={{width: '4%'}}><img src={siteRoot + 'media/img/file/192/txt.png'} alt="icon"/></td>
|
||||
<td className="name a-simulate" style={{width: '46%'}} onClick={this.onReviewsClick}>{fileName}</td>
|
||||
<td className='library'>{item.draft_origin_repo_name}</td>
|
||||
<td className="status" style={{width: "20%"}}>{item.status}</td>
|
||||
<td className="update" style={{width: "20%"}}>{localTime}</td>
|
||||
<td className="status" style={{width: '20%'}}>{item.status}</td>
|
||||
<td className="update" style={{width: '20%'}}>{localTime}</td>
|
||||
<td className="menu-toggle"></td>
|
||||
</tr>
|
||||
);
|
||||
|
@@ -37,7 +37,7 @@ class ReviewListView extends React.Component {
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user