Refactor controls and pagination for Checkpoints and LoRAs: Implement unified PageControls, enhance API integration, and improve event handling for better user experience.

This commit is contained in:
Will Miao
2025-04-10 19:41:02 +08:00
parent 252e90a633
commit ee04df40c3
11 changed files with 667 additions and 264 deletions

View File

@@ -251,6 +251,11 @@ class RecipeManager {
// Update pagination state based on current page and total pages
this.pageState.hasMore = data.page < data.total_pages;
// Increment the page number AFTER successful loading
if (data.items.length > 0) {
this.pageState.currentPage++;
}
} catch (error) {
console.error('Error loading recipes:', error);
appCore.showToast('Failed to load recipes', 'error');