fix: import getFileIcon from utils.js + close button re-bind after setBody
- 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:
+10
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user