Fixed human-readable file size representation (#137)

(as it follows units of IEC 60027-2 A.2 )
This commit is contained in:
0x6d61726b
2024-03-03 15:48:56 +01:00
committed by GitHub
parent f763b9657f
commit 51bcd82ea7
5 changed files with 20 additions and 13 deletions

View File

@@ -41,7 +41,7 @@ import { useToast } from '../hooks/toast'
import { useI18n } from '../hooks/useI18n'
import { ffetch } from '../lib/httpClient'
import { DirectoryEntry } from '../types'
import { base64URLEncode, roundMiB } from '../utils'
import { base64URLEncode, formatSize } from '../utils'
export default function Downloaded() {
const [menuPos, setMenuPos] = useState({ x: 0, y: 0 })
@@ -237,7 +237,7 @@ export default function Downloaded() {
variant="caption"
component="span"
>
{roundMiB(file.size)}
{formatSize(file.size)}
</Typography>
}
{!file.isDirectory && <>