Initial upload

This commit is contained in:
antonn committed 2026-06-10 17:04:11 +00:00
1 parent b0bf3b7167
commit a022f29e34
65 files changed
+46484 -4339

No files matched your search

+9 -1
View File
@@ -94,9 +94,17 @@
} else {
usedGb = data.disk / 1024; limitGb = 0; pct = 0;
}
resDiskLabel.textContent = limitGb > 0
// adpanel:backup-storage - combined storage (server files + backups);
// show the breakdown when backups occupy part of the quota.
const serverMb = (typeof data.disk === 'object') ? data.disk.serverMb : null;
const backupsMb = (typeof data.disk === 'object') ? data.disk.backupsMb : null;
let diskText = limitGb > 0
? `${formatBytes(usedGb * 1073741824)} / ${formatBytes(limitGb * 1073741824)} (${Math.round(pct)}%)`
: `${formatBytes(usedGb * 1073741824)} / Unlimited`;
if (Number.isFinite(backupsMb) && backupsMb > 0 && Number.isFinite(serverMb)) {
diskText += ` — files ${formatBytes(serverMb * 1048576)} + backups ${formatBytes(backupsMb * 1048576)}`;
}
resDiskLabel.textContent = diskText;
resDiskBar.style.width = `${pct}%`;
} else {
resDiskLabel.textContent = '—';