From 906fb704b691de4bed941887d2afbeee19bb5685 Mon Sep 17 00:00:00 2001 From: PascalMarchesseault <97350299+PascalMarchesseault@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:47:47 -0400 Subject: [PATCH] Update post btn --- src/views/contents/ContentCard.vue | 1 + src/views/contents/PublishContentButton.vue | 86 ++++++++++++--------- src/views/creators/CreatorBanner.vue | 2 +- 3 files changed, 50 insertions(+), 39 deletions(-) diff --git a/src/views/contents/ContentCard.vue b/src/views/contents/ContentCard.vue index aa9b2b2..cf2715e 100644 --- a/src/views/contents/ContentCard.vue +++ b/src/views/contents/ContentCard.vue @@ -27,6 +27,7 @@
{{ props.content.description }}
+ diff --git a/src/views/contents/PublishContentButton.vue b/src/views/contents/PublishContentButton.vue index 7eacd4b..01c771e 100644 --- a/src/views/contents/PublishContentButton.vue +++ b/src/views/contents/PublishContentButton.vue @@ -2,7 +2,7 @@ import {useClient} from '@/plugins/api.js'; import {ref} from 'vue'; import {useUserStore} from '@/stores/userStore.js'; -import {v7} from 'uuid' +import {v7} from 'uuid'; const props = defineProps({ creator: {type: Object, required: true}, @@ -15,10 +15,9 @@ const isDialogActive = ref(false); const client = useClient(); const title = ref(''); const message = ref(''); -const files = ref([]) +const files = ref([]); async function publishPost() { - const formData = new FormData(); formData.append('id', v7()); formData.append('creatorId', userStore.user.id); @@ -36,29 +35,27 @@ async function publishPost() { headers: { 'Content-Type': 'multipart/form-data', } - }) - - closeDialog() + } + ); + closeDialog(); } catch (error) { - console.error(error) + console.error(error); } } const cancelPost = () => { - closeDialog() + closeDialog(); } const closeDialog = () => { - isDialogActive.value = false - title.value = '' - message.value = '' - files.value = [] + isDialogActive.value = false; + title.value = ''; + message.value = ''; + files.value = []; } - + diff --git a/src/views/creators/CreatorBanner.vue b/src/views/creators/CreatorBanner.vue index 11d2081..4e77930 100644 --- a/src/views/creators/CreatorBanner.vue +++ b/src/views/creators/CreatorBanner.vue @@ -45,7 +45,7 @@ class="rounded-full border-solid border-2 z-20 lg:max-w-[200px] max-w-[200px] h-auto" :src="creator.images.logo" alt="Profile Picture" - :style="{ borderColor: creator.colors.accent || '#A30E79', height: '150px' /* Adjust the height here */ }" + :style="{ borderColor: creator.colors.accent || '#A30E79', height: '150px'}" />