From d1d654ebac2d51e3841675faeb56480e440f622f Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 5 Mar 2024 18:08:09 +0100 Subject: Initial commit --- frontend/src/routes/circles/+page.svelte | 101 +++++++++++++++++++++++++++++++ frontend/src/routes/circles/+page.ts | 12 ++++ 2 files changed, 113 insertions(+) create mode 100644 frontend/src/routes/circles/+page.svelte create mode 100644 frontend/src/routes/circles/+page.ts (limited to 'frontend/src/routes/circles') diff --git a/frontend/src/routes/circles/+page.svelte b/frontend/src/routes/circles/+page.svelte new file mode 100644 index 0000000..14b0866 --- /dev/null +++ b/frontend/src/routes/circles/+page.svelte @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + openModal(AddCircle)} /> + + + {#if circles} + +
+ + {#each circles.edges as { id, name }, index (id)} + + + + + + {:else} + + {/each} + +
+ + {:else} + + {/if} +
diff --git a/frontend/src/routes/circles/+page.ts b/frontend/src/routes/circles/+page.ts new file mode 100644 index 0000000..ea5c3df --- /dev/null +++ b/frontend/src/routes/circles/+page.ts @@ -0,0 +1,12 @@ +import { CircleSort, type CircleFilterInput } from '$gql/graphql'; +import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation'; + +export const trailingSlash = 'always'; + +export function load({ url }: { url: URL; params: Record }) { + return { + sort: parseSortData(url.searchParams, CircleSort.Name), + filter: parseFilter(url.searchParams), + pagination: parsePaginationData(url.searchParams) + }; +} -- cgit v1.2.3-2-gb3c3