Files
ComfyUI-Lora-Manager/static/css/components/modal/delete-modal.css
T
Will Miao 6e45ef566c fix(sidebar): verify folder deletion against the backend
The sidebar derives "empty folder" from the models-only list, which omits
models flagged `exclude: true`, while the delete guard walks the folder on
disk and refuses on any weight file. A folder whose models are all excluded
therefore looked empty, offered the confirmation, and then failed with
"still contains models".

The delete modal still opens on that prediction, but is now corrected by a
dry run of the very delete the user is about to confirm, so the button state
cannot contradict the backend. The confirm button stays disabled while the
check runs, and a late answer is discarded once the modal is dismissed or
retargeted. The dry run also covers weight files no scanner indexes (a lora
folder holding only a `.gguf`, say) and files that appeared after the last
scan.

`_collect_folder_manifest()` now reports `excluded_model_count`, and the
refusal names the excluded models, so the message explains the mismatch
instead of reading like a bug. Locale files carry the sync placeholders in
this commit; the translations follow.
2026-09-26 12:07:03 +08:00

102 lines
2.6 KiB
CSS

/* Delete Modal specific styles */
.delete-message {
color: var(--text-color);
margin: var(--space-2) 0;
}
/* Update delete modal styles */
.delete-modal {
display: none; /* Set initial display to none */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* Darker than --modal-backdrop-bg to stress destructive actions, but keeps the shared blur */
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(var(--modal-backdrop-blur, 6px));
-webkit-backdrop-filter: blur(var(--modal-backdrop-blur, 6px));
z-index: var(--z-overlay);
}
/* Add new style for when modal is shown */
.delete-modal.show {
display: flex;
align-items: center;
justify-content: center;
}
/* Self-managed by SettingsManager: stacks above the settings modal like the
directory picker (settings panels sit at 10000/10002). */
#filenameTemplateConfirmModal {
z-index: 10010;
}
.delete-modal-content {
max-width: 500px;
width: 90%;
text-align: center;
margin: 0 auto;
position: relative;
animation: modalFadeIn 0.2s ease-out;
}
/* The folder delete confirm button is held disabled while the folder contents
are checked against the backend, so it must not look clickable. */
#deleteFolderModal .delete-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
#deleteFolderModal .delete-btn:disabled:hover {
background: var(--lora-error);
}
#resolveFilenameConflictsModal .confirmation-message {
color: var(--text-color);
margin: var(--space-2) 0;
font-size: 1em;
line-height: 1.5;
}
#resolveFilenameConflictsModal .resolve-conflicts-detail {
color: var(--text-color);
margin: var(--space-2) 0;
font-size: 0.95em;
line-height: 1.5;
}
#resolveFilenameConflictsModal .resolve-conflicts-detail code {
background: var(--lora-surface);
padding: 2px 6px;
border-radius: 3px;
font-family: var(--font-mono);
border: 1px solid var(--lora-border);
}
#resolveFilenameConflictsModal .resolve-conflicts-impact {
background: var(--lora-surface);
border: 1px solid var(--lora-border);
border-radius: var(--border-radius-sm);
padding: var(--space-2);
margin: var(--space-2) 0;
color: var(--text-color);
text-align: left;
line-height: 1.5;
}
.delete-model-info,
.exclude-model-info {
/* Update info display styling */
background: var(--lora-surface);
border: 1px solid var(--lora-border);
border-radius: var(--border-radius-sm);
padding: var(--space-2);
margin: var(--space-2) 0;
color: var(--text-color);
word-break: break-all;
text-align: left;
line-height: 1.5;
}