mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
refactor: remove legacy card components and update imports to use shared ModelCard component
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
// Legacy CheckpointCard.js - now using shared ModelCard component
|
||||
import {
|
||||
createModelCard,
|
||||
setupModelCardEventDelegation
|
||||
} from './shared/ModelCard.js';
|
||||
|
||||
// Re-export functions with original names for backwards compatibility
|
||||
export function createCheckpointCard(checkpoint) {
|
||||
return createModelCard(checkpoint, 'checkpoint');
|
||||
}
|
||||
|
||||
export function setupCheckpointCardEventDelegation() {
|
||||
setupModelCardEventDelegation('checkpoint');
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// Legacy LoraCard.js - now using shared ModelCard component
|
||||
import {
|
||||
createModelCard,
|
||||
setupModelCardEventDelegation,
|
||||
updateCardsForBulkMode
|
||||
} from './shared/ModelCard.js';
|
||||
|
||||
// Re-export functions with original names for backwards compatibility
|
||||
export function createLoraCard(lora) {
|
||||
return createModelCard(lora, 'lora');
|
||||
}
|
||||
|
||||
export function setupLoraCardEventDelegation() {
|
||||
setupModelCardEventDelegation('lora');
|
||||
}
|
||||
|
||||
export { updateCardsForBulkMode };
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* CheckpointModal - Main entry point
|
||||
*
|
||||
* Legacy CheckpointModal - now using shared ModelModal component
|
||||
*/
|
||||
import { showModelModal } from '../shared/ModelModal.js';
|
||||
|
||||
// Re-export function with original name for backwards compatibility
|
||||
export function showCheckpointModal(checkpoint) {
|
||||
return showModelModal(checkpoint, 'checkpoint');
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// Legacy LoraModal - now using shared ModelModal component
|
||||
import { showModelModal } from '../shared/ModelModal.js';
|
||||
|
||||
// Re-export function with original name for backwards compatibility
|
||||
export function showLoraModal(lora) {
|
||||
return showModelModal(lora, 'lora');
|
||||
}
|
||||
@@ -48,7 +48,7 @@ function handleModelCardEvent_internal(event, modelType) {
|
||||
|
||||
if (event.target.closest('.fa-star')) {
|
||||
event.stopPropagation();
|
||||
toggleFavorite(card, modelType);
|
||||
toggleFavorite(card);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ function showBlurredContent(card) {
|
||||
}
|
||||
}
|
||||
|
||||
async function toggleFavorite(card, modelType) {
|
||||
async function toggleFavorite(card) {
|
||||
const starIcon = card.querySelector('.fa-star');
|
||||
const isFavorite = starIcon.classList.contains('fas');
|
||||
const newFavoriteState = !isFavorite;
|
||||
|
||||
Reference in New Issue
Block a user