feat: backup management page + max backups config + auto-cleanup
CI / lint (push) Failing after 4s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 9s

- Config: max_backups_per_file (default 10) in config.json + UI field
- Auto-cleanup: _backup_file deletes oldest backups when limit exceeded
- New endpoints: GET /api/backups (list all), POST /api/backups/delete,
  POST /api/backups/purge (by file or vault)
- New module: backup-manager.js - full-page view with filter, grouped by
  vault/file, individual delete, per-file purge, stats
- Link from backup viewer footer: 'Gerer tous les backups'
This commit is contained in:
2026-06-04 20:15:31 -04:00
parent ca132c2668
commit fb87c9f7c3
6 changed files with 485 additions and 1 deletions
+9
View File
@@ -213,6 +213,7 @@ function renderMainView() {
'<div class="backup-footer">' +
'<span class="backup-footer-hint">Backups crees lors de la sauvegarde manuelle (Ctrl+S)</span>' +
'<button class="backup-footer-manage-btn" id="backup-manage-btn">Gerer tous les backups</button>' +
'</div>';
setBody(html);
@@ -249,6 +250,14 @@ function bindEvents() {
}
var modeBtn = document.getElementById('backup-diff-mode-btn');
var manageBtn = document.getElementById('backup-manage-btn');
if (manageBtn) {
manageBtn.addEventListener('click', function() {
close();
import('./backup-manager.js').then(function(m) { m.openBackupManager(); });
});
}
if (modeBtn) {
modeBtn.addEventListener('click', function() {
state.diffMode = state.diffMode === 'sidebyside' ? 'unified' : 'sidebyside';