diff --git a/frontend/js/backups.js b/frontend/js/backups.js index 743dcab..e523189 100644 --- a/frontend/js/backups.js +++ b/frontend/js/backups.js @@ -112,7 +112,16 @@ function createOverlay() { function setBody(html) { const panel = document.getElementById('backup-viewer-panel'); - if (panel) panel.innerHTML = html; + if (!panel) return; + panel.innerHTML = html; + // Re-bind close button after innerHTML replacement + const closeBtn = panel.querySelector('.backup-close-btn'); + if (closeBtn) { + closeBtn.addEventListener('click', (e) => { + e.stopPropagation(); + close(); + }); + } } function close() { diff --git a/frontend/js/vaulthome.js b/frontend/js/vaulthome.js index d436a23..2ced4cb 100644 --- a/frontend/js/vaulthome.js +++ b/frontend/js/vaulthome.js @@ -15,7 +15,8 @@ */ import { api } from './auth.js'; -import { el, safeCreateIcons, getFileIcon } from './viewer.js'; +import { el, safeCreateIcons } from './viewer.js'; +import { getFileIcon } from './utils.js'; import { TabManager } from './ui.js'; // ---------------------------------------------------------------------------