Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix(downloads): improve progress to only show 100 percent if fully completed (#4621)

Meier Lukas10627453d5b5
diff --git a/packages/widgets/src/downloads/component.tsx b/packages/widgets/src/downloads/component.tsx
index 02e58efd2..9af29da6d 100644
--- a/packages/widgets/src/downloads/component.tsx
+++ b/packages/widgets/src/downloads/component.tsx
@@ -473,13 +473,16 @@ export default function DownloadClientsWidget({
return (
<Group align="center" gap="xs" wrap="nowrap" w="100%">
<Text size="xs">
- {new Intl.NumberFormat("en", { style: "percent", notation: "compact", unitDisplay: "narrow" }).format(
- progress,
- )}
+ {new Intl.NumberFormat("en", {
+ style: "percent",
+ notation: "compact",
+ unitDisplay: "narrow",
+ roundingMode: "floor",
+ }).format(progress)}
</Text>
<Progress
w="100%"
- value={progress * 100}
+ value={Math.floor(progress * 100)}
color={row.original.state === "paused" ? "yellow" : progress === 1 ? "green" : "blue"}
radius="lg"
/>