feat: add bulk move recipes endpoint

Add new move_recipes_bulk endpoint to handle moving multiple recipes simultaneously. This improves efficiency when reorganizing recipe collections by allowing batch operations instead of individual moves.

- Add move_recipes_bulk handler method with proper error handling
- Register new POST /api/lm/recipes/move-bulk route
- Implement bulk move logic in persistence service
- Validate required parameters (recipe_ids and target_path)
- Handle common error cases including validation, not found, and server errors
This commit is contained in:
Will Miao
2025-11-26 00:57:35 +08:00
parent 3f646aa0c9
commit 6e64f97e2b
11 changed files with 423 additions and 60 deletions

View File

@@ -220,6 +220,11 @@ class RecipeManager {
refreshVirtualScroll();
});
}
const bulkButton = document.querySelector('[data-action="bulk"]');
if (bulkButton) {
bulkButton.addEventListener('click', () => window.bulkManager?.toggleBulkMode());
}
}
// This method is kept for compatibility but now uses virtual scrolling
@@ -285,4 +290,4 @@ document.addEventListener('DOMContentLoaded', async () => {
});
// Export for use in other modules
export { RecipeManager };
export { RecipeManager };