mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
clean package.json and repair code style (#2411)
* clean package.json and repair code style * update css style * repair bug
This commit is contained in:
committed by
Daniel Pan
parent
3ab4cbff4f
commit
3a67d78016
@@ -1,4 +1,4 @@
|
||||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
import { serviceUrl } from '../constants';
|
||||
import OperationGroup from '../dirent-operation/operation-group';
|
||||
|
||||
@@ -66,9 +66,9 @@ class TreeDirList extends React.Component {
|
||||
render() {
|
||||
let node = this.props.node;
|
||||
return (
|
||||
<tr className={this.state.highlight ? "tr-highlight" : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onMouseOver={this.onMouseOver}>
|
||||
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onMouseOver={this.onMouseOver}>
|
||||
<td className="icon">
|
||||
<img src={node.type === "dir" ? serviceUrl + "/media/img/folder-192.png" : serviceUrl + "/media/img/file/192/txt.png"}></img>
|
||||
<img src={node.type === 'dir' ? serviceUrl + '/media/img/folder-192.png' : serviceUrl + '/media/img/file/192/txt.png'}></img>
|
||||
</td>
|
||||
<td className="name a-simulate" onClick={this.onMainNodeClick}>{node.name}</td>
|
||||
{
|
||||
@@ -89,7 +89,7 @@ class TreeDirList extends React.Component {
|
||||
<td>{node.size}</td>
|
||||
<td title={node.last_update_time}>{node.last_update_time}</td>
|
||||
</tr>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,17 @@
|
||||
import React from "react";
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { gettext, repoID } from '../constants';
|
||||
import editorUtilities from '../../utils/editor-utilties';
|
||||
import URLDecorator from '../../utils/url-decorator';
|
||||
import ZipDownloadDialog from '../dialog/zip-download-dialog';
|
||||
import TreeDirList from './tree-dir-list'
|
||||
import "../../css/common.css";
|
||||
import TreeDirList from './tree-dir-list';
|
||||
|
||||
const propTypes = {
|
||||
needOperationGroup: PropTypes.bool.isRequired,
|
||||
node: PropTypes.object.isRequired,
|
||||
onMainNodeClick: PropTypes.func.isRequired,
|
||||
onDeleteItem: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
class TreeDirView extends React.Component {
|
||||
|
||||
@@ -61,13 +68,13 @@ class TreeDirView extends React.Component {
|
||||
this.setState({
|
||||
isProgressDialogShow: false,
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
onItemMenuShow = () => {
|
||||
this.setState({
|
||||
isItemFreezed: true,
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
onItemMenuHide = () => {
|
||||
@@ -84,21 +91,20 @@ class TreeDirView extends React.Component {
|
||||
<div className="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
{
|
||||
this.props.needOperationGroup ?
|
||||
{this.props.needOperationGroup ?
|
||||
<tr>
|
||||
<th style={{width: "4%"}}></th>
|
||||
<th style={{width: "46%"}}>{gettext('Name')}</th>
|
||||
<th style={{width: "20%"}}></th>
|
||||
<th style={{width: "15%"}}>{gettext('Size')}</th>
|
||||
<th style={{width: "15%"}}>{gettext('Last Update')}</th>
|
||||
<th style={{width: '4%'}}></th>
|
||||
<th style={{width: '46%'}}>{gettext('Name')}</th>
|
||||
<th style={{width: '20%'}}></th>
|
||||
<th style={{width: '15%'}}>{gettext('Size')}</th>
|
||||
<th style={{width: '15%'}}>{gettext('Last Update')}</th>
|
||||
</tr>
|
||||
:
|
||||
<tr>
|
||||
<th style={{width: "4%"}}></th>
|
||||
<th style={{width: "66%"}}>{gettext('Name')}</th>
|
||||
<th style={{width: "15%"}}>{gettext('Size')}</th>
|
||||
<th style={{width: "15%"}}>{gettext('Last Update')}</th>
|
||||
<th style={{width: '4%'}}></th>
|
||||
<th style={{width: '66%'}}>{gettext('Name')}</th>
|
||||
<th style={{width: '15%'}}>{gettext('Size')}</th>
|
||||
<th style={{width: '15%'}}>{gettext('Last Update')}</th>
|
||||
</tr>
|
||||
}
|
||||
</thead>
|
||||
@@ -116,7 +122,7 @@ class TreeDirView extends React.Component {
|
||||
onDelete={this.props.onDeleteItem}
|
||||
needOperationGroup={this.props.needOperationGroup}
|
||||
/>
|
||||
)
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -125,8 +131,10 @@ class TreeDirView extends React.Component {
|
||||
<ZipDownloadDialog progress={this.state.progress} onCancleDownload={this.onCancelDownload}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
TreeDirView.propTypes = propTypes;
|
||||
|
||||
export default TreeDirView;
|
Reference in New Issue
Block a user