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

@@ -101,6 +101,11 @@ export async function loadMoreCheckpoints(resetPagination = true) {
const card = createCheckpointCard(checkpoint);
grid.appendChild(card);
});
// Increment the page number AFTER successful loading
if (data.items.length > 0) {
pageState.currentPage++;
}
} catch (error) {
console.error('Error loading checkpoints:', error);
showToast('Failed to load checkpoints', 'error');