mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-19 07:33:18 +02:00
Fix archives capped at 50 items, add pagination (#843)
The archives page only fetched the 50 most recent prints due to a hardcoded API limit default. Added client-side pagination with configurable page sizes (25/50/100/200/All) and bumped the fetch limit to return all archives. Page size is persisted to localStorage.
This commit is contained in:
@@ -2602,7 +2602,7 @@ export const api = {
|
||||
request<{ used_bytes: number | null; free_bytes: number | null }>(`/printers/${printerId}/storage`),
|
||||
|
||||
// Archives
|
||||
getArchives: (printerId?: number, projectId?: number, limit = 50, offset = 0, dateFrom?: string, dateTo?: string) => {
|
||||
getArchives: (printerId?: number, projectId?: number, limit = 10000, offset = 0, dateFrom?: string, dateTo?: string) => {
|
||||
const params = new URLSearchParams();
|
||||
if (printerId) params.set('printer_id', String(printerId));
|
||||
if (projectId) params.set('project_id', String(projectId));
|
||||
|
||||
Reference in New Issue
Block a user