fix: storage quota not shown with Stalwart #577

This commit is contained in:
Linus Rath
2026-07-07 20:35:37 +02:00
parent 9930d19ba4
commit db2c642d74
5 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ export function truncateText(text: string, maxLength: number): string {
}
export function formatFileSize(bytes: number): string {
if (bytes === 0) return '0 Bytes';
if (!Number.isFinite(bytes) || bytes <= 0) return '0 Bytes';
const k = 1024;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];