diff --git a/src/lib/components/composites/project-components/settings/ProjectMemberListEntrySkeleton.svelte b/src/lib/components/composites/project-components/settings/ProjectMemberListEntrySkeleton.svelte new file mode 100644 index 0000000..d112b84 --- /dev/null +++ b/src/lib/components/composites/project-components/settings/ProjectMemberListEntrySkeleton.svelte @@ -0,0 +1,11 @@ + + +
+
+ + +
+ +
diff --git a/src/routes/project/[projectId]/settings/members/+page.svelte b/src/routes/project/[projectId]/settings/members/+page.svelte index 2509e4c..d86b0c8 100644 --- a/src/routes/project/[projectId]/settings/members/+page.svelte +++ b/src/routes/project/[projectId]/settings/members/+page.svelte @@ -1,8 +1,13 @@ @@ -15,4 +20,42 @@ {/await} -Members content + + {#if true} +
+

Manage Access

+ +
+ {:else} +

Members

+ {/if} +
+ {#await loadingMembers} + {#each { length: numberOfSkeletons }, i} + + {#if i < numberOfSkeletons - 1} + + {/if} + {/each} + {:then members} + {#each members as member, i} + + + {#if i < members.length - 1} + + {/if} + {/each} + {:catch error} +
+ + Loading Project Members failed{error ? `: ${error.message}` : "."} + +
+ {/await} +
+
diff --git a/src/routes/project/[projectId]/settings/members/+page.ts b/src/routes/project/[projectId]/settings/members/+page.ts new file mode 100644 index 0000000..990aaf8 --- /dev/null +++ b/src/routes/project/[projectId]/settings/members/+page.ts @@ -0,0 +1,15 @@ +import { BackendController } from "$lib/controller/backend-controller"; +import type { PageLoad } from "./$types"; + +export const load: PageLoad = ({ params }) => { + const projectId = Number(params.projectId); + const projectController = BackendController.getInstance().project(projectId); + const loadingMembers = projectController.getMembers(); + + // attach noop-catch to handle promise rejection correctly (see https://svelte.dev/docs/kit/load#Streaming-with-promises) + loadingMembers.catch(() => {}); + + return { + loadingMembers, + }; +};