diff --git a/src/client/web/src/components/panel_files.tsx b/src/client/web/src/components/panel_files.tsx index 11e43ae..4e42a4b 100644 --- a/src/client/web/src/components/panel_files.tsx +++ b/src/client/web/src/components/panel_files.tsx @@ -34,6 +34,7 @@ import { import { HotkeyHandler } from "../common/hotkeys"; import { CronTable } from "../common/cron"; import { Title } from "./visual/title"; +import { NotFoundBanner } from "./visual/banner_notfound"; export interface Item { name: string; @@ -772,11 +773,17 @@ export class FilesPanel extends React.Component { /> ); const viewType = this.props.ui.control.controls.get(filesViewCtrl); - const view = ( -
- {this.prepareColumns(this.props.filesInfo.items, showOp)} -
- ); // TODO: support better views in the future + const view = + this.props.filesInfo.items.size > 0 ? ( +
+ {orderByButtons} +
+ {this.prepareColumns(this.props.filesInfo.items, showOp)} +
+
+ ) : ( + + ); // TODO: support better views in the future const usedSpace = FileSize( // TODO: this a work around before transaction is introduced @@ -925,7 +932,7 @@ export class FilesPanel extends React.Component { />
- {orderByButtons} + {view} diff --git a/src/client/web/src/components/visual/banner_notfound.tsx b/src/client/web/src/components/visual/banner_notfound.tsx index 3ed8663..da0dd68 100644 --- a/src/client/web/src/components/visual/banner_notfound.tsx +++ b/src/client/web/src/components/visual/banner_notfound.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { List } from "immutable"; -import { RiQuestionnaireFill } from "@react-icons/all-files/ri/RiQuestionnaireFill"; +import { RiFileList2Fill } from "@react-icons/all-files/ri/RiFileList2Fill"; import { Flexbox } from "../layout/flexbox"; @@ -13,7 +13,7 @@ export const NotFoundBanner = (props: Props) => { return ( , + ,

{props.title}

, diff --git a/src/client/web/src/i18n/en_US.ts b/src/client/web/src/i18n/en_US.ts index 7e67683..e07efe6 100644 --- a/src/client/web/src/i18n/en_US.ts +++ b/src/client/web/src/i18n/en_US.ts @@ -1,6 +1,7 @@ import { Map } from "immutable"; export const msgs: Map = Map({ + "terms.nothingHere": "There is nothing here", "stateMgr.cap.fail": "failed to get captcha id", "browser.upload.del.fail": "Failed to delete uploading item", "browser.folder.add.fail": "Folder name can not be empty", diff --git a/src/client/web/src/i18n/zh_CN.ts b/src/client/web/src/i18n/zh_CN.ts index cbe5fa8..864adc4 100644 --- a/src/client/web/src/i18n/zh_CN.ts +++ b/src/client/web/src/i18n/zh_CN.ts @@ -2,6 +2,7 @@ import { Map } from "immutable"; export const msgs: Map = Map({ "stateMgr.cap.fail": "获取captcha id失败", + "terms.nothingHere": "这里空空如也", "browser.upload.del.fail": "删除上传失败", "browser.folder.add.fail": "文件夹名不可为空", "browser.del.fail": "至少选择一个文件或文件夹",