fix(model-manager): replace window.confirm with in-app modal
Browsers suppress native confirm() dialogs after repeated use (the "prevent this page from creating additional dialogs" checkbox), which silently broke deletes. Add a promise-based in-app confirmation modal and use it for gallery photo and installed-model deletes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -172,6 +172,23 @@ code { background: var(--bg-3); padding: 1px 5px; border-radius: 4px; font-size:
|
||||
.nav-ico { font-size: 18px; }
|
||||
}
|
||||
|
||||
/* ---- confirm modal ---- */
|
||||
.modal-overlay {
|
||||
position: fixed; inset: 0; z-index: 200;
|
||||
background: rgba(8,10,16,.7);
|
||||
display: flex; align-items: center; justify-content: center; padding: 24px;
|
||||
}
|
||||
.modal-overlay[hidden] { display: none; }
|
||||
.modal {
|
||||
background: var(--bg-2); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 22px; max-width: 420px; width: 100%;
|
||||
box-shadow: 0 12px 40px rgba(0,0,0,.5);
|
||||
}
|
||||
.modal p { margin: 0 0 20px; font-size: 15px; line-height: 1.45; word-break: break-word; }
|
||||
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
|
||||
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
|
||||
.btn.danger-solid:hover { background: #e0414f; }
|
||||
|
||||
/* ---- lightbox ---- */
|
||||
.lightbox {
|
||||
position: fixed; inset: 0; z-index: 100;
|
||||
|
||||
Reference in New Issue
Block a user