Refactor Lora handling in RecipeRoutes and enhance RecipeManager

- Updated Lora filtering logic in RecipeRoutes to skip deleted LoRAs without exclusion checks, improving performance and clarity.
- Enhanced condition for fetching cached LoRAs to ensure valid data is processed.
- Added toggleApiKeyVisibility function to RecipeManager, improving API key management in the UI.
This commit is contained in:
Will Miao
2025-03-29 19:11:13 +08:00
parent b65350b7cb
commit 8e3308039a
2 changed files with 9 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import { ImportManager } from './managers/ImportManager.js';
import { RecipeCard } from './components/RecipeCard.js';
import { RecipeModal } from './components/RecipeModal.js';
import { getCurrentPageState } from './state/index.js';
import { toggleApiKeyVisibility } from './managers/SettingsManager.js';
class RecipeManager {
constructor() {
@@ -54,6 +55,7 @@ class RecipeManager {
// Only expose what's needed for the page
window.recipeManager = this;
window.importManager = this.importManager;
window.toggleApiKeyVisibility = toggleApiKeyVisibility;
}
initEventListeners() {