mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 20:39:25 -03:00
feat(recipe): add bulk Repair Metadata for Selected operation to recipes page
Adds a new bulk operation in the recipes page that allows users to select multiple recipes and repair their metadata in batch. Backend: - New POST /api/lm/recipes/repair-bulk endpoint accepting recipe_ids array - repair_recipes_bulk handler iterates repair_recipe_by_id for each recipe - Response includes per-recipe updated data for frontend card refresh Frontend: - Bulk context menu: new 'Repair Metadata for Selected' item in Metadata section - BulkManager.repairSelectedRecipes() with loading/toast flow - Uses VirtualScroller.updateSingleItem() per repaired recipe (no full reload) - Visibility controlled via repairMetadata actionConfig flag Locales: - Added repairMetadata, repairBulkComplete, repairBulkSkipped, repairBulkFailed - Translated across all 9 supported languages
This commit is contained in:
@@ -41,6 +41,11 @@ export class BulkContextMenu extends BaseContextMenu {
|
||||
const autoOrganizeItem = this.menu.querySelector('[data-action="auto-organize"]');
|
||||
const deleteAllItem = this.menu.querySelector('[data-action="delete-all"]');
|
||||
const downloadMissingLorasItem = this.menu.querySelector('[data-action="download-missing-loras"]');
|
||||
const repairMetadataItem = this.menu.querySelector('[data-action="repair-metadata"]');
|
||||
|
||||
if (repairMetadataItem) {
|
||||
repairMetadataItem.style.display = config.repairMetadata ? 'flex' : 'none';
|
||||
}
|
||||
|
||||
if (sendToWorkflowAppendItem) {
|
||||
sendToWorkflowAppendItem.style.display = config.sendToWorkflow ? 'flex' : 'none';
|
||||
@@ -256,6 +261,9 @@ export class BulkContextMenu extends BaseContextMenu {
|
||||
case 'delete-all':
|
||||
bulkManager.showBulkDeleteModal();
|
||||
break;
|
||||
case 'repair-metadata':
|
||||
bulkManager.repairSelectedRecipes();
|
||||
break;
|
||||
case 'set-favorite': {
|
||||
const allFavorited = this.countFavoritedInSelection() === state.selectedModels.size;
|
||||
bulkManager.setBulkFavorites(!allFavorited);
|
||||
|
||||
Reference in New Issue
Block a user