From af9380365d8930dc418392793ef5a321c7d0ea5d Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Tue, 21 Dec 2021 00:20:55 +0100 Subject: [PATCH] feat: member list in groups --- src/lib/group/Body.svelte | 14 +++-- src/lib/group/MemberEdit.svelte | 97 +++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 src/lib/group/MemberEdit.svelte diff --git a/src/lib/group/Body.svelte b/src/lib/group/Body.svelte index fc86b260..6f77ef30 100644 --- a/src/lib/group/Body.svelte +++ b/src/lib/group/Body.svelte @@ -6,12 +6,16 @@ import Edit from './Edit.svelte'; import twemoji from 'twemoji'; import Privacy from './Privacy.svelte'; + import type Member from 'src/api/member'; + import MemberEdit from './MemberEdit.svelte'; export let group: Group; - let editMode: boolean; + let editMode: boolean = false; + let memberMode: boolean = false; export let isPublic: boolean; export let loading: boolean = false; let privacyLoading = false; + export let members: Member[]; let htmlDescription: string; $: if (group.description) { @@ -42,7 +46,7 @@ -{#if !editMode } +{#if !editMode && !memberMode} {#if group.id} @@ -101,9 +105,11 @@ your system banner {/if} {#if !isPublic} - + {/if} -{:else} +{:else if editMode} +{:else if memberMode} + {/if} \ No newline at end of file diff --git a/src/lib/group/MemberEdit.svelte b/src/lib/group/MemberEdit.svelte new file mode 100644 index 00000000..6bd000ab --- /dev/null +++ b/src/lib/group/MemberEdit.svelte @@ -0,0 +1,97 @@ + + + + +
+ +
Current Members
+ + {#if finalMemberList.length > 0} + + {#each finalMemberList as member, index (member.id)} + {member.name} ({member.id}) {member.display_name ? `${member.display_name}` : ""} + {/each} + + {:else} +

There are no members in this group yet.

+

You can add some in this menu!

+ {/if} + + +
+ +
Add Members
+ +

(this is nonfunctional at the moment)

+
+
+ +
Remove Members
+ +

(this is ALSO nonfunctional)

+ +
+ \ No newline at end of file