fix(web): storage decimals (#5363)

This commit is contained in:
Jason Rasmussen 2023-11-28 15:50:23 -05:00 committed by GitHub
parent 5781ae9d82
commit 9483c456d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -21,7 +21,8 @@
return '0'.repeat(zeroLength);
};
$: [statsUsage, statsUsageUnit] = getBytesWithUnit(stats.usage, 0);
const TiB = 1024 ** 4;
$: [statsUsage, statsUsageUnit] = getBytesWithUnit(stats.usage, stats.usage > TiB ? 2 : 0);
</script>
<div class="flex flex-col gap-5">