feat: Add Lora recipes retrieval and filtering functionality

- Implemented a new API endpoint to fetch recipes associated with a specific Lora by its hash.
- Enhanced the recipe scanning logic to support filtering by Lora hash and bypassing other filters.
- Added a new method to retrieve a recipe by its ID with formatted metadata.
- Created a new RecipeTab component to display recipes in the Lora modal.
- Introduced session storage utilities for managing custom filter states.
- Updated the UI to include a custom filter indicator and loading/error states for recipes.
- Refactored existing recipe management logic to accommodate new features and improve maintainability.
This commit is contained in:
Will Miao
2025-04-07 21:53:39 +08:00
parent b8c78a68e7
commit bddc7a438d
10 changed files with 829 additions and 88 deletions

View File

@@ -32,6 +32,13 @@
<div title="Import recipes" class="control-group">
<button onclick="importManager.showImportModal()"><i class="fas fa-file-import"></i> Import</button>
</div>
<!-- Custom filter indicator button (hidden by default) -->
<div id="customFilterIndicator" class="control-group hidden">
<button class="filter-active">
<i class="fas fa-filter"></i> <span id="customFilterText">Filtered by LoRA</span>
<i class="fas fa-times-circle clear-filter"></i>
</button>
</div>
</div>
</div>