diff --git a/frontend/src/lib/components/Custom-Pagination-Bar.svelte b/frontend/src/lib/components/Custom-Pagination-Bar.svelte new file mode 100644 index 0000000..a113298 --- /dev/null +++ b/frontend/src/lib/components/Custom-Pagination-Bar.svelte @@ -0,0 +1,128 @@ + + +
+ + + + + + + Page Size + {#each [12, 24, 48, 96] as pageSize} + + + {pageSize} + + + {/each} + + + + + {#if total > 0} + + + {#if page <= 1} + + + + {:else} + + + + + + {/if} + {#each pages as page (page.key)} + {#if page.type === 'ellipsis'} + + + + {:else} + + + + {page.value} + + + + {/if} + {/each} + {#if page >= total / perPage} + + + + {:else} + + + + + + {/if} + + + {/if} +
diff --git a/frontend/src/routes/(app)/links/+page.svelte b/frontend/src/routes/(app)/links/+page.svelte index 77a162e..96d2e7a 100644 --- a/frontend/src/routes/(app)/links/+page.svelte +++ b/frontend/src/routes/(app)/links/+page.svelte @@ -9,7 +9,6 @@ import * as Select from '$lib/components/ui/select' import * as Command from '$lib/components/ui/command' import * as Popover from '$lib/components/ui/popover' - import * as Pagination from '$lib/components/ui/pagination' import * as Dialog from '$lib/components/ui/dialog' import { Input } from '$lib/components/ui/input' import ScrollArea from '$lib/components/ui/scroll-area/scroll-area.svelte' @@ -24,6 +23,7 @@ } from 'lucide-svelte' import ShortenerCard from '$lib/components/ShortenerCard.svelte' + import CustomPaginationBar from '$lib/components/Custom-Pagination-Bar.svelte' import Form from './(components)/form.svelte' import EditProjectLinkPage from '../projects/[id]/links/[linkid]/edit/+page.svelte' import ProjectLinkQRPage from '../projects/[id]/links/[linkid]/qr/+page.svelte' @@ -80,7 +80,7 @@
+ class="flex flex-wrap-reverse items-center justify-start gap-4 p-4"> @@ -124,10 +124,10 @@ class="justify-between"> {selectedProject} + class="ml-2 h-4 w-4 shrink-0 opacity-50" /> - + No project found. @@ -186,7 +186,7 @@ -
+
- +
@@ -208,7 +209,7 @@ -