From 190e330072e22f4f0c97a206876d65bae3930320 Mon Sep 17 00:00:00 2001
From: Jonathan Grim <jonjongrim@gmail.com>
Date: Mon, 5 Feb 2024 20:59:57 +0100
Subject: [PATCH] add how to join to edit info section

---
 src/pages/Community/CommunityInfo.vue     | 1 +
 src/pages/Community/EditCommunityInfo.vue | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/src/pages/Community/CommunityInfo.vue b/src/pages/Community/CommunityInfo.vue
index e32586a..46593a4 100644
--- a/src/pages/Community/CommunityInfo.vue
+++ b/src/pages/Community/CommunityInfo.vue
@@ -68,6 +68,7 @@ const editInfoDrawerOpen = ref(false);
 
 const details = computed(() => [
   { value: communityStore.community.description, label: "Description" },
+  { value: communityStore.community.how_to_join, label: "How to join" },
   { value: communityStore.community.website, label: "Website" },
   {
     value: communityStore.community.code_of_conduct_url,
diff --git a/src/pages/Community/EditCommunityInfo.vue b/src/pages/Community/EditCommunityInfo.vue
index 8148caa..fadd1d0 100644
--- a/src/pages/Community/EditCommunityInfo.vue
+++ b/src/pages/Community/EditCommunityInfo.vue
@@ -9,6 +9,10 @@
           <FormLabel for="description">Description</FormLabel>
           <FormTextArea id="description" v-model="description" class="h-40" />
         </div>
+        <div class="flex flex-col">
+          <FormLabel for="howToJoin">How to join</FormLabel>
+          <FormTextArea id="howToJoin" v-model="howToJoin" class="h-40" />
+        </div>
         <div class="flex flex-col">
           <FormLabel for="website">Website</FormLabel>
           <FormInput id="website" v-model="website" type="url" />
@@ -143,6 +147,7 @@ const enabledSocials = ref<string[]>(
   }, [] as string[])
 );
 const description = ref(communityStore.community.description ?? "");
+const howToJoin = ref(communityStore.community.how_to_join ?? "");
 const website = ref(communityStore.community.website ?? "");
 const codeOfConductUrl = ref(
   communityStore.community.code_of_conduct_url ?? ""
@@ -160,6 +165,7 @@ async function handleSubmit() {
   try {
     const update = {
       description: description.value,
+      how_to_join: howToJoin.value,
       website: website.value,
       code_of_conduct_url: codeOfConductUrl.value,
       twitter: enabledSocials.value.includes("Twitter") ? twitter.value : null,