From 8e8c29979f537a975107a9bdd620393ffe54c95c Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 12 Jul 2026 14:50:58 +0200 Subject: [PATCH] fix(system-disks): format absolute storage values with shared byte helper (#6299) --- .../init/_steps/import/file-info-card.tsx | 4 +- .../src/app/[locale]/manage/medias/page.tsx | 4 +- .../manage/tools/docker/docker-table.tsx | 4 +- packages/common/src/number.ts | 109 +++++++++++++++++- packages/common/src/test/number.spec.ts | 90 +++++++++++++++ .../src/dashdot/dashdot-integration.ts | 4 +- .../src/unraid/unraid-integration.ts | 3 +- .../src/archive-team-warrior/component.tsx | 4 +- packages/widgets/src/docker/component.tsx | 6 +- packages/widgets/src/downloads/component.tsx | 35 +++--- .../cluster/resource-popover.tsx | 19 +-- .../src/health-monitoring/system-health.tsx | 4 +- .../src/immich/server-stats/component.tsx | 4 +- .../media-transcoding/panels/queue.panel.tsx | 4 +- .../panels/statistics.panel.tsx | 4 +- .../widgets/src/system-disks/component.tsx | 24 ++-- .../chart/combined-network-traffic.tsx | 4 +- .../system-resources/chart/memory-chart.tsx | 6 +- .../chart/network-traffic.tsx | 6 +- 19 files changed, 259 insertions(+), 79 deletions(-) create mode 100644 packages/common/src/test/number.spec.ts diff --git a/apps/nextjs/src/app/[locale]/init/_steps/import/file-info-card.tsx b/apps/nextjs/src/app/[locale]/init/_steps/import/file-info-card.tsx index 8a3a14fb4..c947719c2 100644 --- a/apps/nextjs/src/app/[locale]/init/_steps/import/file-info-card.tsx +++ b/apps/nextjs/src/app/[locale]/init/_steps/import/file-info-card.tsx @@ -2,7 +2,7 @@ import { ActionIcon, Button, Group, Text } from "@mantine/core"; import type { FileWithPath } from "@mantine/dropzone"; import { IconPencil } from "@tabler/icons-react"; -import { humanFileSize } from "@homarr/common"; +import { formatBytes } from "@homarr/common"; import { useScopedI18n } from "@homarr/translation/client"; import { InitStepCard } from "../../_components/init-step-card"; @@ -22,7 +22,7 @@ export const FileInfoCard = ({ file, onRemove }: FileInfoCardProps) => { {file.name} - {humanFileSize(file.size)} + {formatBytes(file.size)}