1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

improve/add-empty-tip-when-no-file (#6760)

This commit is contained in:
Michael An
2024-09-12 14:03:29 +08:00
committed by GitHub
parent b6ae9eca80
commit 5bebec6aee
9 changed files with 73 additions and 33 deletions

View File

@@ -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'}