support for searching subdirectory names for extra networks

This commit is contained in:
AUTOMATIC
2023-01-29 10:20:19 +03:00
parent 1d24665229
commit f6b7768f84
8 changed files with 20 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ function setupExtraNetworksForTab(tabname){
searchTerm = search.value.toLowerCase()
gradioApp().querySelectorAll('#'+tabname+'_extra_tabs div.card').forEach(function(elem){
text = elem.querySelector('.name').textContent.toLowerCase()
text = elem.querySelector('.name').textContent.toLowerCase() + " " + elem.querySelector('.search_term').textContent.toLowerCase()
elem.style.display = text.indexOf(searchTerm) == -1 ? "none" : ""
})
});