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:
maziggy
2026-03-30 08:27:34 +02:00
parent eaf0a1c281
commit 86693b4f75
13 changed files with 678 additions and 472 deletions
+1 -1
View File
@@ -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));