diff --git a/frontend/src/lib/components/Pagination.svelte b/frontend/src/lib/components/Pagination.svelte index 10f2d77d..45ba1ae5 100644 --- a/frontend/src/lib/components/Pagination.svelte +++ b/frontend/src/lib/components/Pagination.svelte @@ -40,20 +40,20 @@ const pageWindow = $derived.by(() => { result.push(first); - if (windowStart > first + 1) { + if (windowStart > first + 2) { result.push(null); // left ellipsis - } else if (windowStart === first + 1) { - result.push(windowStart); + } else if (windowStart === first + 2) { + result.push(first + 1); // bridge: one page gap, show directly instead of ellipsis } for (let p = Math.max(windowStart, first + 1); p <= Math.min(windowEnd, last - 1); p++) { result.push(p); } - if (windowEnd < last - 1) { + if (windowEnd < last - 2) { result.push(null); // right ellipsis - } else if (windowEnd === last - 1) { - result.push(windowEnd); + } else if (windowEnd === last - 2) { + result.push(last - 1); // bridge: one page gap, show directly instead of ellipsis } if (last > first) { @@ -105,7 +105,7 @@ const pageWindow = $derived.by(() => {