Implement lazy loading and infinite scroll features in core application

- Added lazy loading for images and initialized infinite scroll in the AppCore class to enhance performance across various pages.
- Updated LoraPageManager and RecipeManager to utilize the new initializePageFeatures method for common UI features.
- Enhanced infinite scroll functionality to dynamically load more content based on the page type, improving user experience.
- Refactored recipes.html to trigger the import modal through the ModalManager for better modal handling.
This commit is contained in:
Will Miao
2025-03-19 17:04:58 +08:00
parent 32fa81cf93
commit 04545c5706
5 changed files with 114 additions and 29 deletions

View File

@@ -65,9 +65,7 @@ class LoraPageManager {
async initialize() {
// Initialize page-specific components
initializeInfiniteScroll();
initializeEventListeners();
lazyLoadImages();
restoreFolderFilter();
initFolderTagsVisibility();
new LoraContextMenu();
@@ -77,6 +75,9 @@ class LoraPageManager {
// Initialize the bulk manager
bulkManager.initialize();
// Initialize common page features (lazy loading, infinite scroll)
appCore.initializePageFeatures();
}
}