Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add how to join to edit info section #245

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pages/Community/CommunityInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions src/pages/Community/EditCommunityInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down Expand Up @@ -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 ?? ""
Expand All @@ -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,
Expand Down
Loading