From a402ee5fa714d09a669327f53ac2ae23f38a6e52 Mon Sep 17 00:00:00 2001 From: CJ <72030708+cj12312021@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:10:21 -0600 Subject: [PATCH] support filesize in scene list (#4480) --- .../src/components/Scenes/SceneListTable.tsx | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Scenes/SceneListTable.tsx b/ui/v2.5/src/components/Scenes/SceneListTable.tsx index 847fd2cb3c4..2e2c969fbb2 100644 --- a/ui/v2.5/src/components/Scenes/SceneListTable.tsx +++ b/ui/v2.5/src/components/Scenes/SceneListTable.tsx @@ -3,7 +3,7 @@ import { Link } from "react-router-dom"; import * as GQL from "src/core/generated-graphql"; import NavUtils from "src/utils/navigation"; import TextUtils from "src/utils/text"; -import { FormattedMessage, useIntl } from "react-intl"; +import { FormattedMessage, FormattedNumber, useIntl } from "react-intl"; import { objectTitle } from "src/core/files"; import { galleryTitle } from "src/core/galleries"; import SceneQueue from "src/models/sceneQueue"; @@ -168,6 +168,28 @@ export const SceneListTable: React.FC = ( ); + function renderFileSize(file: { size: number | undefined }) { + const { size, unit } = TextUtils.fileSize(file.size); + + return ( + + ); + } + + const FileSizeCell = (scene: GQL.SlimSceneDataFragment) => ( + + ); + const FrameRateCell = (scene: GQL.SlimSceneDataFragment) => (