mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-23 12:27:48 +00:00
improve/add-empty-tip-when-no-file (#6760)
This commit is contained in:
@@ -18,6 +18,7 @@ import ContextMenu from '../context-menu/context-menu';
|
||||
import { hideMenu, showMenu } from '../context-menu/actions';
|
||||
import DirentsDraggedPreview from '../draggable/dirents-dragged-preview';
|
||||
import { EVENT_BUS_TYPE } from '../common/event-bus-type';
|
||||
import EmptyTip from '../empty-tip';
|
||||
|
||||
const propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
@@ -651,6 +652,7 @@ class DirentListView extends React.Component {
|
||||
onDragLeave={this.onTableDragLeave}
|
||||
onDrop={this.tableDrop}
|
||||
>
|
||||
{direntList.length > 0 &&
|
||||
<table className={`table-hover ${isDesktop ? '' : 'table-thead-hidden'}`}>
|
||||
{isDesktop ? (
|
||||
<thead onMouseDown={this.onThreadMouseDown} onContextMenu={this.onThreadContextMenu}>
|
||||
@@ -729,6 +731,10 @@ class DirentListView extends React.Component {
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
{direntList.length === 0 &&
|
||||
<EmptyTip text={gettext('No file')}/>
|
||||
}
|
||||
<Fragment>
|
||||
<ContextMenu
|
||||
id={'dirent-container-menu'}
|
||||
|
@@ -14,7 +14,7 @@ const propTypes = {
|
||||
onAddFile: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
class DirentNodeView extends React.Component {
|
||||
class DirentNoneView extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@@ -88,6 +88,6 @@ class DirentNodeView extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
DirentNodeView.propTypes = propTypes;
|
||||
DirentNoneView.propTypes = propTypes;
|
||||
|
||||
export default DirentNodeView;
|
||||
export default DirentNoneView;
|
||||
|
Reference in New Issue
Block a user