mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-26 07:35:44 -03:00
Fix toggle folder tag
This commit is contained in:
@@ -3,6 +3,7 @@ import { showToast } from '../utils/uiHelpers.js';
|
|||||||
import { createLoraCard } from '../components/LoraCard.js';
|
import { createLoraCard } from '../components/LoraCard.js';
|
||||||
import { initializeInfiniteScroll } from '../utils/infiniteScroll.js';
|
import { initializeInfiniteScroll } from '../utils/infiniteScroll.js';
|
||||||
import { showDeleteModal } from '../utils/modalUtils.js';
|
import { showDeleteModal } from '../utils/modalUtils.js';
|
||||||
|
import { toggleFolder } from '../utils/uiHelpers.js';
|
||||||
|
|
||||||
export async function loadMoreLoras(boolUpdateFolders = false) {
|
export async function loadMoreLoras(boolUpdateFolders = false) {
|
||||||
if (state.isLoading || !state.hasMore) return;
|
if (state.isLoading || !state.hasMore) return;
|
||||||
@@ -88,17 +89,7 @@ function updateFolderTags(folders) {
|
|||||||
// Reattach click handlers
|
// Reattach click handlers
|
||||||
const tags = folderTagsContainer.querySelectorAll('.tag');
|
const tags = folderTagsContainer.querySelectorAll('.tag');
|
||||||
tags.forEach(tag => {
|
tags.forEach(tag => {
|
||||||
tag.addEventListener('click', function() {
|
tag.addEventListener('click', toggleFolder);
|
||||||
const folder = this.dataset.folder;
|
|
||||||
// Remove active class from all tags
|
|
||||||
tags.forEach(t => t.classList.remove('active'));
|
|
||||||
// Add active class to clicked tag
|
|
||||||
this.classList.add('active');
|
|
||||||
// Update state and reload
|
|
||||||
state.activeFolder = folder;
|
|
||||||
state.currentPage = 1;
|
|
||||||
resetAndReload();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user