mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
refactor: rename 'lora-card' to 'model-card' across styles and scripts for consistency
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
export function updateRecipeCard(recipeId, updates) {
|
||||
// Find the card with matching recipe ID
|
||||
const recipeCard = document.querySelector(`.lora-card[data-id="${recipeId}"]`);
|
||||
const recipeCard = document.querySelector(`.model-card[data-id="${recipeId}"]`);
|
||||
if (!recipeCard) return;
|
||||
|
||||
// Get the recipe card component instance
|
||||
|
||||
@@ -9,7 +9,7 @@ let pendingExcludePath = null;
|
||||
export function showDeleteModal(filePath) {
|
||||
pendingDeletePath = filePath;
|
||||
|
||||
const card = document.querySelector(`.lora-card[data-filepath="${filePath}"]`);
|
||||
const card = document.querySelector(`.model-card[data-filepath="${filePath}"]`);
|
||||
const modelName = card ? card.dataset.name : filePath.split('/').pop();
|
||||
const modal = modalManager.getModal('deleteModal').element;
|
||||
const modelInfo = modal.querySelector('.delete-model-info');
|
||||
@@ -49,7 +49,7 @@ export function closeDeleteModal() {
|
||||
export function showExcludeModal(filePath) {
|
||||
pendingExcludePath = filePath;
|
||||
|
||||
const card = document.querySelector(`.lora-card[data-filepath="${filePath}"]`);
|
||||
const card = document.querySelector(`.model-card[data-filepath="${filePath}"]`);
|
||||
const modelName = card ? card.dataset.name : filePath.split('/').pop();
|
||||
const modal = modalManager.getModal('excludeModal').element;
|
||||
const modelInfo = modal.querySelector('.exclude-model-info');
|
||||
|
||||
@@ -168,13 +168,13 @@ function updateThemeToggleIcons(theme) {
|
||||
}
|
||||
|
||||
function filterByFolder(folderPath) {
|
||||
document.querySelectorAll('.lora-card').forEach(card => {
|
||||
document.querySelectorAll('.model-card').forEach(card => {
|
||||
card.style.display = card.dataset.folder === folderPath ? '' : 'none';
|
||||
});
|
||||
}
|
||||
|
||||
export function openCivitai(filePath) {
|
||||
const loraCard = document.querySelector(`.lora-card[data-filepath="${filePath}"]`);
|
||||
const loraCard = document.querySelector(`.model-card[data-filepath="${filePath}"]`);
|
||||
if (!loraCard) return;
|
||||
|
||||
const metaData = JSON.parse(loraCard.dataset.meta);
|
||||
|
||||
Reference in New Issue
Block a user