fix(hostinger): VPS memory/disk son MB no bytes, corregir formatBytes
This commit is contained in:
@@ -574,11 +574,10 @@ document.addEventListener('alpine:init', () => {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
formatBytes(bytes) {
|
formatBytes(mb) {
|
||||||
if (!bytes || bytes === 0) return '—';
|
if (!mb || mb === 0) return '—';
|
||||||
const gb = bytes / (1024 ** 3);
|
const gb = mb / 1024;
|
||||||
if (gb >= 1) return gb.toFixed(1) + ' GB';
|
if (gb >= 1) return gb.toFixed(1) + ' GB';
|
||||||
const mb = bytes / (1024 ** 2);
|
|
||||||
return mb.toFixed(0) + ' MB';
|
return mb.toFixed(0) + ' MB';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user