From 209ca0fa0d22dcd8ec0082b15fbfde3d8491ee91 Mon Sep 17 00:00:00 2001 From: Jake Fulmine Date: Sat, 2 Sep 2023 20:08:55 +0200 Subject: [PATCH] feat(dashboard): add formatted group view --- .../src/components/member/GroupEdit.svelte | 66 +++++++++++++++---- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/dashboard/src/components/member/GroupEdit.svelte b/dashboard/src/components/member/GroupEdit.svelte index fdad1923..40411744 100644 --- a/dashboard/src/components/member/GroupEdit.svelte +++ b/dashboard/src/components/member/GroupEdit.svelte @@ -1,5 +1,5 @@ {#if err} {err} {/if} +{#if longGroupList(groupsWithMember).length > 1000} +The total length of the group list is greater than 1000 characters, which means the group list will be cut short when viewed in the bot! +{/if}
Current Groups - {#if finalGroupsList && finalGroupsList.length > 0} + {#if groupsWithMember && groupsWithMember.length > 0} ({groupsWithMember.length} total) {/if}
- - {#if finalGroupsList && finalGroupsList.length > 0} - - {#each finalGroupsList as group, index (group.id)} - {group.name} ({group.id}) - {/each} - - {:else} -

This member is inside no groups.

-

You can add groups in this menu!

- {/if} + + + + + {#if groupsWithMember && groupsWithMember.length > 0} + + + {#each finalGroupsList as group, index (group.id)} + {group.name} ({group.id}) + {/each} + + {:else} +

This member is not a part of any group.

+

You can add this member to groups in this menu!

+ {/if} +
+
+
+ + + + {#if groupsWithMember && groupsWithMember.length > 0} +

+ {#if finalGroupsList.length <= 5} + + {:else} + + {/if} +

+ {:else} +

This member is not a part of any group.

+

You can add this member to groups in this menu!

+ {/if} +
+
+
+