diff --git a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/EmptyFileSVG.tsx b/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/EmptyFileSVG.tsx new file mode 100644 index 00000000000..249949a2e65 --- /dev/null +++ b/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/EmptyFileSVG.tsx @@ -0,0 +1,130 @@ +import React from "react"; + +export interface EmptyFileSVGProps { + isDark?: boolean; +} + +const EmptyFileSVG: React.FC = ({ isDark }) => { + const bgColor = isDark ? "#aecdff" : "#fff"; + + return ( + + + + + + + + + {isDark ? ( + <> + + + + + ) : ( + <> + + + + )} + + + + + + {isDark ? ( + + ) : ( + + )} + + + {isDark ? ( + + ) : ( + + )} + + + + + + + + ); +}; + +export default EmptyFileSVG; diff --git a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/empty-file-dark.svg b/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/empty-file-dark.svg deleted file mode 100644 index 3f6aa60a129..00000000000 --- a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/empty-file-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/empty-file.svg b/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/empty-file.svg deleted file mode 100644 index 938fd523b5f..00000000000 --- a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/icons/empty-file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/index.tsx b/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/index.tsx index 72112135c6d..23f15e05fd2 100644 --- a/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/index.tsx +++ b/packages/flat-components/src/components/CloudStorage/CloudStorageFileList/index.tsx @@ -1,6 +1,5 @@ import "./style.less"; -import emptyFileSVG from "./icons/empty-file.svg"; -import emptyFileDarkSVG from "./icons/empty-file-dark.svg"; +import EmptyFileSVG from "./icons/EmptyFileSVG"; import React, { useCallback, useContext, useMemo, useRef } from "react"; import { Table } from "antd"; @@ -162,7 +161,7 @@ export const CloudStorageFileList: React.FC = ({ {files.length <= 0 && (
- +
{t("no-data")}
diff --git a/packages/flat-components/src/components/HomePage/RoomList/RoomListEmpty/index.tsx b/packages/flat-components/src/components/HomePage/RoomList/RoomListEmpty/index.tsx index 24da094c876..0193712fd57 100644 --- a/packages/flat-components/src/components/HomePage/RoomList/RoomListEmpty/index.tsx +++ b/packages/flat-components/src/components/HomePage/RoomList/RoomListEmpty/index.tsx @@ -1,8 +1,6 @@ import "./style.less"; -import emptyHistorySVG from "../icons/empty-history.svg"; -import emptyRoomSVG from "../icons/empty-room.svg"; -import emptyHistoryDarkSVG from "../icons/empty-history-dark.svg"; -import emptyRoomDarkSVG from "../icons/empty-room-dark.svg"; +import EmptyRoomSVG from "../icons/EmptyRoomSVG"; +import EmptyHistorySVG from "../icons/EmptyHistorySVG"; import React, { useContext } from "react"; import { useTranslate } from "@netless/flat-i18n"; @@ -17,19 +15,7 @@ export const RoomListEmpty: React.FC = ({ isHistory }) => { const darkMode = useContext(DarkModeContext); return (
- empty + {isHistory ? : } {isHistory ? t("no-record") : t("no-room")} diff --git a/packages/flat-components/src/components/HomePage/RoomList/icons/EmptyHistorySVG.tsx b/packages/flat-components/src/components/HomePage/RoomList/icons/EmptyHistorySVG.tsx new file mode 100644 index 00000000000..a2da2db5cd0 --- /dev/null +++ b/packages/flat-components/src/components/HomePage/RoomList/icons/EmptyHistorySVG.tsx @@ -0,0 +1,71 @@ +import React, { CSSProperties } from "react"; + +export interface EmptyHistorySVGProps { + isDark?: boolean; +} + +const EmptyHistorySVG: React.FC = ({ isDark }) => { + const bgColor = isDark ? "#e0ebff" : "#fff"; + const style = isDark ? ({ mixBlendMode: "soft-light" } as CSSProperties) : undefined; + + return ( + + + + + + + + + + + + + + + + + + ); +}; + +export default EmptyHistorySVG; diff --git a/packages/flat-components/src/components/HomePage/RoomList/icons/EmptyRoomSVG.tsx b/packages/flat-components/src/components/HomePage/RoomList/icons/EmptyRoomSVG.tsx new file mode 100644 index 00000000000..f7c249421b3 --- /dev/null +++ b/packages/flat-components/src/components/HomePage/RoomList/icons/EmptyRoomSVG.tsx @@ -0,0 +1,66 @@ +import React from "react"; + +export interface EmptyRoomSVGProps { + isDark?: boolean; +} + +const EmptyRoomSVG: React.FC = ({ isDark }) => { + const bgColor = isDark ? "#93BAFF" : "#fff"; + + return ( + + + + + + + + + + + + + + + + + + ); +}; + +export default EmptyRoomSVG; diff --git a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-history-dark.svg b/packages/flat-components/src/components/HomePage/RoomList/icons/empty-history-dark.svg deleted file mode 100644 index afa686d20b8..00000000000 --- a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-history-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-history.svg b/packages/flat-components/src/components/HomePage/RoomList/icons/empty-history.svg deleted file mode 100644 index 33cbc63a743..00000000000 --- a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-history.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-room-dark.svg b/packages/flat-components/src/components/HomePage/RoomList/icons/empty-room-dark.svg deleted file mode 100644 index 1cddb7400de..00000000000 --- a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-room-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-room.svg b/packages/flat-components/src/components/HomePage/RoomList/icons/empty-room.svg deleted file mode 100644 index 6fc917eff1b..00000000000 --- a/packages/flat-components/src/components/HomePage/RoomList/icons/empty-room.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file