mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
feat: improve warning management by removing existing deleted LoRAs and early access warnings
This commit is contained in:
@@ -146,6 +146,18 @@ export class ImportManager {
|
|||||||
if (totalSizeDisplay) {
|
if (totalSizeDisplay) {
|
||||||
totalSizeDisplay.textContent = 'Calculating...';
|
totalSizeDisplay.textContent = 'Calculating...';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove any existing deleted LoRAs warning
|
||||||
|
const deletedLorasWarning = document.getElementById('deletedLorasWarning');
|
||||||
|
if (deletedLorasWarning) {
|
||||||
|
deletedLorasWarning.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove any existing early access warning
|
||||||
|
const earlyAccessWarning = document.getElementById('earlyAccessWarning');
|
||||||
|
if (earlyAccessWarning) {
|
||||||
|
earlyAccessWarning.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleImportMode(mode) {
|
toggleImportMode(mode) {
|
||||||
@@ -532,17 +544,17 @@ export class ImportManager {
|
|||||||
const nextButton = document.querySelector('#detailsStep .primary-btn');
|
const nextButton = document.querySelector('#detailsStep .primary-btn');
|
||||||
if (!nextButton) return;
|
if (!nextButton) return;
|
||||||
|
|
||||||
// Count deleted LoRAs
|
// Always clean up previous warnings first
|
||||||
const deletedLoras = this.recipeData.loras.filter(lora => lora.isDeleted).length;
|
|
||||||
|
|
||||||
// If we have deleted LoRAs, show a warning and update button text
|
|
||||||
if (deletedLoras > 0) {
|
|
||||||
// Remove any existing warning
|
|
||||||
const existingWarning = document.getElementById('deletedLorasWarning');
|
const existingWarning = document.getElementById('deletedLorasWarning');
|
||||||
if (existingWarning) {
|
if (existingWarning) {
|
||||||
existingWarning.remove();
|
existingWarning.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Count deleted LoRAs
|
||||||
|
const deletedLoras = this.recipeData.loras.filter(lora => lora.isDeleted).length;
|
||||||
|
|
||||||
|
// If we have deleted LoRAs, show a warning and update button text
|
||||||
|
if (deletedLoras > 0) {
|
||||||
// Create a new warning container above the buttons
|
// Create a new warning container above the buttons
|
||||||
const buttonsContainer = document.querySelector('#detailsStep .modal-actions') || nextButton.parentNode;
|
const buttonsContainer = document.querySelector('#detailsStep .modal-actions') || nextButton.parentNode;
|
||||||
const warningContainer = document.createElement('div');
|
const warningContainer = document.createElement('div');
|
||||||
|
|||||||
Reference in New Issue
Block a user