diff --git a/index.html b/index.html
index 22a98f3..1100ab5 100644
--- a/index.html
+++ b/index.html
@@ -10814,6 +10814,7 @@ ${vpnBadgeTopo}
Onglet Sauvegardes : Planification Cron & Gestion des fichiers
============================================================ */
let serverBackupsCache = [];
+ let serverBackupsTotalSize = '0 o';
function initBackupCronSelects() {
const hSel = $('backupCronHour');
@@ -10901,12 +10902,16 @@ ${vpnBadgeTopo}
function renderServerBackupsTable(backups, totalSizeStr) {
serverBackupsCache = Array.isArray(backups) ? backups : [];
+ if (typeof totalSizeStr === 'string' && totalSizeStr) {
+ const cleanSize = totalSizeStr.replace(/^.*:\s*/, '').trim();
+ if (cleanSize) serverBackupsTotalSize = cleanSize;
+ }
const tbody = $('backupsTableBody');
const summary = $('backupsListSummary');
if (summary) {
summary.textContent = t('backup_list_summary', '{count} sauvegarde(s) • Espace utilisé : {size}')
.replace('{count}', String(serverBackupsCache.length))
- .replace('{size}', totalSizeStr || '0 o');
+ .replace('{size}', serverBackupsTotalSize || '0 o');
}
if (!tbody) return;
if (!serverBackupsCache.length) {
@@ -11182,9 +11187,7 @@ ${vpnBadgeTopo}
});
// Mettre à jour les boutons Distant dans la table des sauvegardes
if (serverBackupsCache && serverBackupsCache.length) {
- const summary = $('backupsListSummary');
- const sumText = summary ? summary.textContent.split('•')[1]?.trim() : '';
- renderServerBackupsTable(serverBackupsCache, sumText);
+ renderServerBackupsTable(serverBackupsCache, serverBackupsTotalSize);
}
}