Fix: Disk Usage zeigt undefined für TB/PB Werte
Lokale formatBytes Funktion hatte sizes Array nur bis GB. TB und PB ergänzt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,7 @@ export default function Dashboard() {
|
||||
const formatBytes = (bytes: number) => {
|
||||
if (bytes === 0) return "0 B"
|
||||
const k = 1024
|
||||
const sizes = ["B", "KB", "MB", "GB"]
|
||||
const sizes = ["B", "KB", "MB", "GB", "TB", "PB"]
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||
return (bytes / Math.pow(k, i)).toFixed(1) + " " + sizes[i]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user