fix: import getFileIcon from utils.js + close button re-bind after setBody
CI / lint (push) Failing after 8s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 9s

- vaulthome.js: getFileIcon was imported from viewer.js but lives in utils.js
- backups.js: setBody() now re-binds close button handler after innerHTML replacement
This commit is contained in:
2026-06-04 14:58:07 -04:00
parent 0b3a7d5c95
commit 247d78374c
2 changed files with 12 additions and 2 deletions
+10 -1
View File
@@ -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() {
+2 -1
View File
@@ -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';
// ---------------------------------------------------------------------------