From 2012e9484b5d1f3fcee59980993a895b90c276a3 Mon Sep 17 00:00:00 2001 From: Fulmine Date: Wed, 2 Mar 2022 10:57:04 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20creating=20groups!=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/group/List.svelte | 7 ++ src/lib/group/NewGroup.svelte | 163 ++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 src/lib/group/NewGroup.svelte diff --git a/src/lib/group/List.svelte b/src/lib/group/List.svelte index 0e9f3770..9180d136 100644 --- a/src/lib/group/List.svelte +++ b/src/lib/group/List.svelte @@ -9,6 +9,7 @@ import Body from './Body.svelte'; import Svelecte, { addFormatter } from 'svelecte'; import FaLock from 'svelte-icons/fa/FaLock.svelte'; + import NewGroup from './NewGroup.svelte'; import { Member, Group } from '../../api/types'; import api from '../../api'; @@ -168,6 +169,11 @@ function updateDelete(event: any) { list = list.filter(group => group.id !== event.detail); } + + function addGroupToList(event: any) { + list.push(event.detail); + list = list; + } @@ -278,6 +284,7 @@ + {#each slicedList as group, index (group.id)} {#if (!isPublic && group.privacy.visibility === "public") || isPublic} diff --git a/src/lib/group/NewGroup.svelte b/src/lib/group/NewGroup.svelte new file mode 100644 index 00000000..dfbd0771 --- /dev/null +++ b/src/lib/group/NewGroup.svelte @@ -0,0 +1,163 @@ + + + + + +
+ +
+ Add new Group +
+ {#if message} + {@html message} + {/if} + {#each err as error} + {@html error} + {/each} + + + + + + + +