#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Show real file sizes in the signing steps instead of rounding to megabytes (#7851)
Anthony Stirling12043a2fd07a
diff --git a/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsx b/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsxindex 5e229ab9b3..96d003e6c6 100644--- a/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsx+++ b/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsx@@ -9,6 +9,7 @@ import SendIcon from "@mui/icons-material/Send";import CalendarTodayIcon from "@mui/icons-material/CalendarToday";import type { SignatureSettings } from "@app/components/tools/certSign/SignatureSettingsInput";import type { FileState } from "@app/types/file";+import { formatFileSize } from "@app/utils/fileUtils";interface ReviewSessionStepProps {selectedFile: FileState;@@ -62,7 +63,7 @@ export const ReviewSessionStep: React.FC<ReviewSessionStepProps> = ({</Text>{selectedFile.size && (<Text size="xs" c="dimmed">- {(selectedFile.size / 1024 / 1024).toFixed(2)} MB+ {formatFileSize(selectedFile.size)}</Text>)}</div>diff --git a/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsx b/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsxindex 14bd56f75c..f1f7f0e095 100644--- a/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsx+++ b/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsx@@ -3,6 +3,7 @@ import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";import type { FileState } from "@app/types/file";+import { formatFileSize } from "@app/utils/fileUtils";interface SelectDocumentStepProps {selectedFiles: FileState[];@@ -56,7 +57,7 @@ export const SelectDocumentStep: React.FC<SelectDocumentStepProps> = ({</Text>{selectedFile?.size && (<Text size="xs" c="dimmed">- {(selectedFile.size / 1024 / 1024).toFixed(2)} MB+ {formatFileSize(selectedFile.size)}</Text>)}</div>