fix: backup listing uses same vault for read/write + global close handler
- _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:
@@ -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
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user