Implement search

This commit is contained in:
Will Miao
2025-02-04 23:15:10 +08:00
parent 763e55fcae
commit df957d3d67
7 changed files with 184 additions and 33 deletions

View File

@@ -199,13 +199,17 @@ export async function replacePreview(filePath) {
input.click();
}
function appendLoraCards(loras) {
export function appendLoraCards(loras) {
const grid = document.getElementById('loraGrid');
const sentinel = document.getElementById('scroll-sentinel');
loras.forEach(lora => {
const card = createLoraCard(lora);
grid.insertBefore(card, sentinel);
if (sentinel) {
grid.insertBefore(card, sentinel);
} else {
grid.appendChild(card);
}
});
}