mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Enhance recipe search functionality with improved state management and search options
- Introduced new search options for recipes, allowing users to filter by title, tags, LoRA filename, and LoRA model name. - Updated the RecipeRoutes and RecipeScanner to accommodate the new search options, enhancing the filtering capabilities. - Refactored RecipeManager and RecipeSearchManager to utilize the hierarchical state structure for managing search parameters and pagination state. - Improved the user interface by dynamically displaying relevant search options based on the current page context.
This commit is contained in:
@@ -194,7 +194,7 @@ export class SearchManager {
|
||||
});
|
||||
}
|
||||
|
||||
// Apply recursive search
|
||||
// Apply recursive search - only if the toggle exists
|
||||
if (this.recursiveSearchToggle && preferences.recursive !== undefined) {
|
||||
this.recursiveSearchToggle.checked = preferences.recursive;
|
||||
}
|
||||
@@ -245,10 +245,14 @@ export class SearchManager {
|
||||
});
|
||||
|
||||
const preferences = {
|
||||
options,
|
||||
recursive: this.recursiveSearchToggle ? this.recursiveSearchToggle.checked : false
|
||||
options
|
||||
};
|
||||
|
||||
// Only add recursive option if the toggle exists
|
||||
if (this.recursiveSearchToggle) {
|
||||
preferences.recursive = this.recursiveSearchToggle.checked;
|
||||
}
|
||||
|
||||
localStorage.setItem(`${this.currentPage}_search_prefs`, JSON.stringify(preferences));
|
||||
} catch (error) {
|
||||
console.error('Error saving search preferences:', error);
|
||||
|
||||
Reference in New Issue
Block a user