refactor: streamline LoraCard event handling and implement virtual scrolling for improved performance

This commit is contained in:
Will Miao
2025-05-09 16:33:34 +08:00
parent 1121d1ee6c
commit 5dd8d905fa
6 changed files with 570 additions and 195 deletions

View File

@@ -70,16 +70,6 @@ export async function replacePreview(filePath) {
return replaceModelPreview(filePath, 'lora');
}
export function appendLoraCards(loras) {
const grid = document.getElementById('loraGrid');
const sentinel = document.getElementById('scroll-sentinel');
loras.forEach(lora => {
const card = createLoraCard(lora);
grid.appendChild(card);
});
}
export async function resetAndReload(updateFolders = false) {
return baseResetAndReload({
updateFolders,