From 35711df34955cc377439f7dc37d7b6ddd807540d Mon Sep 17 00:00:00 2001 From: Fulmine Date: Tue, 1 Mar 2022 12:29:45 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20adding=20members!=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/member/List.svelte | 7 + src/lib/member/NewMember.svelte | 228 ++++++++++++++++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 src/lib/member/NewMember.svelte diff --git a/src/lib/member/List.svelte b/src/lib/member/List.svelte index b1ec637e..72703d74 100644 --- a/src/lib/member/List.svelte +++ b/src/lib/member/List.svelte @@ -9,6 +9,7 @@ import Svelecte, { addFormatter } from 'svelecte'; import FaLock from 'svelte-icons/fa/FaLock.svelte'; import Body from './Body.svelte'; + import NewMember from './NewMember.svelte'; import { Member, Group } from '../../api/types'; import api from '../../api'; @@ -170,6 +171,11 @@ function updateDelete(event: any) { list = list.filter(member => member.id !== event.detail); } + + function addMemberToList(event: any) { + list.push(event.detail); + list = list; + } @@ -280,6 +286,7 @@ + {#each slicedList as member, index (member.id)} {#if (!isPublic && member.privacy.visibility === "public") || isPublic} diff --git a/src/lib/member/NewMember.svelte b/src/lib/member/NewMember.svelte new file mode 100644 index 00000000..30500617 --- /dev/null +++ b/src/lib/member/NewMember.svelte @@ -0,0 +1,228 @@ + + + + + +
+ +
+ Add new Member +
+ {#if message} + {@html message} + {/if} + {#each err as error} + {@html error} + {/each} + + + + + + + +