fix: backup listing uses same vault for read/write + global close handler
CI / lint (push) Failing after 16s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 9s

- _get_backup_dir: now resolves relative path using the SPECIFIC vault's
  directory (matching _backup_file exactly), not the first vault in index
- Removed _get_backup_root (unused after refactor)
- backups.js: global document click handler for #backup-close (same
  pattern as Graph View's initGraphView)
This commit is contained in:
2026-06-04 17:10:40 -04:00
parent 67043a76e5
commit 21117da114
2 changed files with 16 additions and 24 deletions
+6
View File
@@ -14,6 +14,12 @@ import { showToast } from './ui.js';
import { refreshSidebarTreePreservingState } from './sidebar.js';
import { safeCreateIcons } from './utils.js';
// Global handler: same pattern as Graph View's initGraphView()
document.addEventListener('click', function(e) {
const btn = e.target.closest('#backup-close');
if (btn && state.overlay) close();
});
// ---------------------------------------------------------------------------
// State
// ---------------------------------------------------------------------------