From 681fc3cee533c3d1cccccd5773184712b9d009f7 Mon Sep 17 00:00:00 2001 From: LTbinglingfeng Date: Mon, 5 Jan 2026 00:00:22 +0800 Subject: [PATCH] fix(quota): cap per-page credentials to 14 --- src/components/quota/QuotaSection.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/quota/QuotaSection.tsx b/src/components/quota/QuotaSection.tsx index 377285c..83c3d93 100644 --- a/src/components/quota/QuotaSection.tsx +++ b/src/components/quota/QuotaSection.tsx @@ -24,6 +24,7 @@ type QuotaSetter = (updater: QuotaUpdater) => void; type ViewMode = 'paged' | 'all'; +const MAX_ITEMS_PER_PAGE = 14; const MAX_SHOW_ALL_THRESHOLD = 30; interface QuotaPaginationState { @@ -153,8 +154,8 @@ export function QuotaSection({ if (effectiveViewMode === 'all') { setPageSize(Math.max(1, filteredFiles.length)); } else { - // Paged mode: 3 rows * columns - setPageSize(columns * 3); + // Paged mode: 3 rows * columns, capped to avoid oversized pages. + setPageSize(Math.min(columns * 3, MAX_ITEMS_PER_PAGE)); } }, [effectiveViewMode, columns, filteredFiles.length, setPageSize]);