fix: rewrite backup viewer close button — match editor-btn pattern
CI / lint (push) Failing after 2m24s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Failing after 5s

- Close button: <button class="backup-close-btn"><i data-lucide="x"></i></button>
  (same HTML pattern as AdminPanel editor-btn)
- Handler: addEventListener via DOM query in setBody() after innerHTML
  (same JS pattern as AdminPanel)
- Removed all inline onclick, global capture handler, window._backupViewerClose
- CSS: .backup-close-btn now matches .editor-btn style (bordered icon button)
- Escape key + overlay click still work for closing
This commit is contained in:
2026-06-04 16:06:39 -04:00
parent bc8083fd6b
commit 05ac6cd756
2 changed files with 39 additions and 75 deletions
+10 -10
View File
@@ -7250,24 +7250,24 @@ body.popup-mode .content-area {
}
.backup-close-btn {
width: 32px;
height: 32px;
border: none;
width: 36px;
height: 36px;
padding: 0;
border: 1px solid var(--border);
border-radius: 6px;
background: transparent;
color: var(--text-muted);
font-size: 1.4rem;
color: var(--text-secondary);
cursor: pointer;
display: flex;
transition: all 150ms ease;
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 1;
transition: color 0.15s, background 0.15s;
flex: 0 0 auto;
}
.backup-close-btn:hover {
color: var(--text-primary);
background: var(--bg-tertiary);
color: var(--accent);
border-color: var(--accent);
}
.backup-toolbar {