mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
Enhance LoRA and Recipe templates by adding request context to template rendering. Update JavaScript to initialize search managers with context-specific options and improve header navigation with dynamic search placeholders. Refactor header component for better context awareness in search functionality.
This commit is contained in:
@@ -5,6 +5,7 @@ import { initializeCommonComponents } from './common.js';
|
||||
import { ImportManager } from './managers/ImportManager.js';
|
||||
import { RecipeCard } from './components/RecipeCard.js';
|
||||
import { RecipeModal } from './components/RecipeModal.js';
|
||||
import { SearchManager } from './managers/SearchManager.js';
|
||||
|
||||
class RecipeManager {
|
||||
constructor() {
|
||||
@@ -28,6 +29,21 @@ class RecipeManager {
|
||||
|
||||
// Load initial set of recipes
|
||||
this.loadRecipes();
|
||||
|
||||
// Initialize search manager with Recipe-specific options
|
||||
const recipeSearchManager = new SearchManager({
|
||||
searchCallback: (query, options, recursive) => {
|
||||
// Recipe-specific search implementation
|
||||
fetchRecipes({
|
||||
search: query,
|
||||
search_options: options,
|
||||
recursive: recursive
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Set the current page for proper context
|
||||
document.body.dataset.page = 'recipes';
|
||||
}
|
||||
|
||||
initEventListeners() {
|
||||
|
||||
Reference in New Issue
Block a user