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;
|
||||
},
|
||||
|
||||
formatBytes(bytes) {
|
||||
if (!bytes || bytes === 0) return '—';
|
||||
const gb = bytes / (1024 ** 3);
|
||||
formatBytes(mb) {
|
||||
if (!mb || mb === 0) return '—';
|
||||
const gb = mb / 1024;
|
||||
if (gb >= 1) return gb.toFixed(1) + ' GB';
|
||||
const mb = bytes / (1024 ** 2);
|
||||
return mb.toFixed(0) + ' MB';
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user