fix(downloads): improve progress to only show 100 percent if fully completed (#4621)
This commit is contained in:
@@ -473,13 +473,16 @@ export default function DownloadClientsWidget({
|
|||||||
return (
|
return (
|
||||||
<Group align="center" gap="xs" wrap="nowrap" w="100%">
|
<Group align="center" gap="xs" wrap="nowrap" w="100%">
|
||||||
<Text size="xs">
|
<Text size="xs">
|
||||||
{new Intl.NumberFormat("en", { style: "percent", notation: "compact", unitDisplay: "narrow" }).format(
|
{new Intl.NumberFormat("en", {
|
||||||
progress,
|
style: "percent",
|
||||||
)}
|
notation: "compact",
|
||||||
|
unitDisplay: "narrow",
|
||||||
|
roundingMode: "floor",
|
||||||
|
}).format(progress)}
|
||||||
</Text>
|
</Text>
|
||||||
<Progress
|
<Progress
|
||||||
w="100%"
|
w="100%"
|
||||||
value={progress * 100}
|
value={Math.floor(progress * 100)}
|
||||||
color={row.original.state === "paused" ? "yellow" : progress === 1 ? "green" : "blue"}
|
color={row.original.state === "paused" ? "yellow" : progress === 1 ? "green" : "blue"}
|
||||||
radius="lg"
|
radius="lg"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user