From 1221373562dd71ce591393afb0208323f9edfb89 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Tue, 6 Aug 2024 10:21:39 +0530 Subject: [PATCH 001/118] update --- src/layouts/MainMenu.vue | 2 +- src/pages/SearchPage.vue | 28 +++++++++++++++++++++++++-- src/stores/prompts.js | 41 +++++++++++++++++++++++++++++++--------- 3 files changed, 59 insertions(+), 12 deletions(-) diff --git a/src/layouts/MainMenu.vue b/src/layouts/MainMenu.vue index 21cf2e5c..cf0239ca 100644 --- a/src/layouts/MainMenu.vue +++ b/src/layouts/MainMenu.vue @@ -29,7 +29,7 @@ diff --git a/src/utils/imageConvertor.js b/src/utils/imageConvertor.js index ee0ef1e6..c76a8abf 100644 --- a/src/utils/imageConvertor.js +++ b/src/utils/imageConvertor.js @@ -12,11 +12,26 @@ export async function uploadAndSetImage(imageFile, filePathAndName) { const img = new Image() img.onload = async () => { + const MAX_WIDTH = 2560 + const MAX_HEIGHT = 1440 + let width = img.width + let height = img.height + + if (width > MAX_WIDTH || height > MAX_HEIGHT) { + const widthRatio = MAX_WIDTH / width + const heightRatio = MAX_HEIGHT / height + const ratio = Math.min(widthRatio, heightRatio) + + width = width * ratio + height = height * ratio + } + const canvas = document.createElement('canvas') const ctx = canvas.getContext('2d') - canvas.width = img.width > 2560 ? img.width / 2 : img.width - canvas.height = img.height > 1440 ? img.height / 2 : img.height - ctx.drawImage(img, 0, 0, img.width > 2560 ? img.width / 2 : img.width, img.height > 1440 ? img.height / 2 : img.height) + canvas.width = width + canvas.height = height + + ctx.drawImage(img, 0, 0, width, height) canvas.toBlob(async (blob) => { try { From a037f9006d07a5bb9f0dfc6d9bc7804ec5e376e8 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Mon, 9 Sep 2024 10:44:55 +0530 Subject: [PATCH 036/118] update --- src/components/Advertiser/AdvertiseCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Advertiser/AdvertiseCard.vue b/src/components/Advertiser/AdvertiseCard.vue index 077d04b7..d2a49f27 100644 --- a/src/components/Advertiser/AdvertiseCard.vue +++ b/src/components/Advertiser/AdvertiseCard.vue @@ -26,7 +26,7 @@ counter class="q-mb-lg" data-test="file-image" - :hint="!advertise.image ? '*Image is required. Max size is 5MB.':fileErrorMessage" + :hint="!advertise.image ? '*Image is required. Max size is 2MB.':fileErrorMessage" :label="advertise.type === 'Banner' ? 'Image' : 'Video'" :max-total-size="5242880" :required="!id" From 0ed51a7f6666ceff590bb6ab8ad24b76513a8e1f Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Mon, 9 Sep 2024 12:44:54 +0530 Subject: [PATCH 037/118] filter-data-fixed --- src/components/Admin/ManagePromptsEntries.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Admin/ManagePromptsEntries.vue b/src/components/Admin/ManagePromptsEntries.vue index 164be78a..74228410 100644 --- a/src/components/Admin/ManagePromptsEntries.vue +++ b/src/components/Admin/ManagePromptsEntries.vue @@ -24,6 +24,7 @@ - +

NO ENTRIES

el?.promptId === promptId) return loadedPrompt ? loadedPrompt?.entries : [] } From ce24e4ebf8529235828303df9ca6dccf5ff6213e Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Mon, 9 Sep 2024 15:43:44 +0530 Subject: [PATCH 038/118] comments-sorting-fixed --- firestore.indexs.json | 32 ++++++++++++++++++++++++++++++++ src/stores/comments.js | 3 ++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/firestore.indexs.json b/firestore.indexs.json index 33b32e48..1d3e4af4 100644 --- a/firestore.indexs.json +++ b/firestore.indexs.json @@ -32,6 +32,38 @@ } ] }, + { + "collectionGroup": "comments", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "created", + "order": "ASCENDING" + }, + { + "fieldPath": "text", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "comments", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "isAnonymous", + "order": "ASCENDING" + }, + { + "fieldPath": "created", + "order": "ASCENDING" + }, + { + "fieldPath": "text", + "order": "ASCENDING" + } + ] + }, { "collectionGroup": "comments", "queryScope": "COLLECTION", diff --git a/src/stores/comments.js b/src/stores/comments.js index 85932b93..648bc3ec 100644 --- a/src/stores/comments.js +++ b/src/stores/comments.js @@ -77,7 +77,8 @@ export const useCommentStore = defineStore('comments', { } const q = query( collection(db, collectionName, documentId, 'comments'), - or(where('text', '!=', 'Comment Deleted'), where('isAnonymous', '==', false)) + or(where('text', '!=', 'Comment Deleted'), where('isAnonymous', '==', false)), + orderBy('created') ) this._initialLoading = true this._unSubscribe = onSnapshot(q, async (querySnapshot) => { From ae15c241a06219afb53ee075246472d5de673cb4 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Wed, 11 Sep 2024 15:05:37 +0530 Subject: [PATCH 039/118] filter-data-fixed --- src/components/Admin/ManagePromptsEntries.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Admin/ManagePromptsEntries.vue b/src/components/Admin/ManagePromptsEntries.vue index 74228410..fc221059 100644 --- a/src/components/Admin/ManagePromptsEntries.vue +++ b/src/components/Admin/ManagePromptsEntries.vue @@ -24,7 +24,6 @@ - +

NO ENTRIES

Date: Wed, 11 Sep 2024 18:13:59 +0300 Subject: [PATCH 040/118] feat:#534 implemented loading skeleton cards to be a specific number and responsie to UI --- src/components/shared/ArticleSkeleton.vue | 28 +++++++++++++++++++++-- src/pages/SearchPage.vue | 16 ++++++------- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/components/shared/ArticleSkeleton.vue b/src/components/shared/ArticleSkeleton.vue index b3d4d0e6..8468dbef 100644 --- a/src/components/shared/ArticleSkeleton.vue +++ b/src/components/shared/ArticleSkeleton.vue @@ -1,5 +1,5 @@ + + diff --git a/src/pages/SearchPage.vue b/src/pages/SearchPage.vue index bd02218e..9ccbd139 100644 --- a/src/pages/SearchPage.vue +++ b/src/pages/SearchPage.vue @@ -21,15 +21,12 @@ unelevated /> -
- - - - -
- +
+ +
+ errorStore.throwError(error)) promptStore.fetchPrompts().catch((error) => errorStore.throwError(error)) -onUnmounted(()=>{ +onUnmounted(() => { advertiseStore.reset() }) From 223e86970de1d5efa746c0b1e61bdbafb21fdce1 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Thu, 12 Sep 2024 12:48:05 +0530 Subject: [PATCH 041/118] removeWalletAddress fixed --- src/components/Profile/ProfileTab.vue | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/components/Profile/ProfileTab.vue b/src/components/Profile/ProfileTab.vue index 437ce97d..6167fb53 100644 --- a/src/components/Profile/ProfileTab.vue +++ b/src/components/Profile/ProfileTab.vue @@ -53,20 +53,6 @@ - - Are you sure you want to {{ isUpdate ?'Update':'Set' }}: + Are you sure you want to {{ isUpdate ?'update':'set' }}: {{ currentWalletAddress }} as your wallet address ? @@ -157,6 +143,7 @@ import { Notify, useQuasar } from 'quasar' import { computed, ref, watch } from 'vue' import Web3ModalComponent from './Web3ModalComponent.vue' import { useWalletStore } from 'app/src/stores' +import { customWeb3modal } from 'src/web3/walletConnect' const walletStore = useWalletStore() @@ -246,6 +233,7 @@ function onRemoveWalletAddress() { user.value.walletAddress = ''; walletStore.getWalletInfo.wallet_address = ''; removeWalletAddressDialog.value.show = false; + customWeb3modal.disconnect() save() $q.notify({ message: 'Wallet address removed', type: 'negative' }); } From 3698c1d4b8d81b7cb922b4ff0985d1f6bed7c908 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Thu, 12 Sep 2024 13:49:31 +0530 Subject: [PATCH 042/118] update --- src/components/Admin/ManagePromptsEntries.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/Admin/ManagePromptsEntries.vue b/src/components/Admin/ManagePromptsEntries.vue index fc221059..5941ff50 100644 --- a/src/components/Admin/ManagePromptsEntries.vue +++ b/src/components/Admin/ManagePromptsEntries.vue @@ -213,7 +213,6 @@ function toggleExpand(props) { async function fetchEntriesForPrompt(entriesIds, promptId) { try { - // console.log('entriesIds',entriesIds) const res = await entryStore.fetchPromptsEntries(entriesIds) entryStore._loadedEntries.push({ promptId, entries: res }) } catch (error) { @@ -222,7 +221,6 @@ async function fetchEntriesForPrompt(entriesIds, promptId) { } function getEntriesForPrompt(promptId) { - // console.log('getEntriesForPrompt',promptId) const loadedPrompt = entryStore._loadedEntries.find((el) => el?.promptId === promptId) return loadedPrompt ? loadedPrompt?.entries : [] } From 2beb42c56628a690c2da8d9f80617fe36c44aeba Mon Sep 17 00:00:00 2001 From: Lupanciuc Marc Date: Thu, 12 Sep 2024 12:51:41 +0300 Subject: [PATCH 043/118] feat:#502 Improved immediate ui feedback for likes and dislikes --- src/components/Posts/ThePost.vue | 48 ++++++++++++++++++++++++-------- src/stores/likes.js | 4 --- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/components/Posts/ThePost.vue b/src/components/Posts/ThePost.vue index 93ea3e70..1c02d1d6 100644 --- a/src/components/Posts/ThePost.vue +++ b/src/components/Posts/ThePost.vue @@ -218,23 +218,36 @@ watchEffect(async () => { await statsStore.addArticle(props.post?.id, promptId, props.post.author?.uid, props.post?.title, props.post.description) } - if (props.isAdd) { - await statsStore.addAdvertisement( - props.post.id, - props.post.author?.uid, - props.post.title, - props.post.content, - props.post.budget, - props.post.duration - ) - } + if (props.isAdd) { + await statsStore.addAdvertisement( + props.post.id, + props.post.author?.uid, + props.post.title, + props.post.content, + props.post.budget, + props.post.duration + ) + } }) async function like() { + if (likeStore._isLoading) return + + const userLikeIndex = likeStore._likes?.findIndex((like) => like.id === userId) + + if (userLikeIndex !== -1) { + likeStore._likes?.splice(userLikeIndex, 1) + } else { + likeStore._dislikes = likeStore._dislikes?.filter((dislike) => dislike.id !== userId) + likeStore._likes.push({ id: userId }) + } + if (isPrompt) { await likeStore.addLike(props.collectionName, id, null, id, null).catch((error) => errorStore.throwError('Error adding like', error)) } else if (props.isAdd) { - await likeStore.addLike(props.collectionName, props.post.id, null, null, id).catch((error) => errorStore.throwError('Error adding like', error)) + await likeStore + .addLike(props.collectionName, props.post.id, null, null, id) + .catch((error) => errorStore.throwError('Error adding like', error)) } else { await likeStore .addLike(props.collectionName, id, id, props.post?.prompt?.id, null) @@ -243,10 +256,21 @@ async function like() { } async function dislike() { + if (likeStore._isLoading) return + const userDislikeIndex = likeStore._dislikes?.findIndex((dislike) => dislike.id === userId) + if (userDislikeIndex !== -1) { + likeStore._dislikes?.splice(userDislikeIndex, 1) + } else { + likeStore._likes = likeStore._likes?.filter((like) => like.id !== userId) + likeStore._dislikes?.push({ id: userId }) + } + if (isPrompt) { await likeStore.addDislike(props.collectionName, id, null, id, null).catch((error) => errorStore.throwError('Error adding like', error)) } else if (props.isAdd) { - await likeStore.addDislike(props.collectionName, props.post.id, null, null, id).catch((error) => errorStore.throwError('Error adding like', error)) + await likeStore + .addDislike(props.collectionName, props.post.id, null, null, id) + .catch((error) => errorStore.throwError('Error adding like', error)) } else { await likeStore .addDislike(props.collectionName, id, id, props.post?.prompt?.id, null) diff --git a/src/stores/likes.js b/src/stores/likes.js index 560d11e6..4f6dab1d 100644 --- a/src/stores/likes.js +++ b/src/stores/likes.js @@ -84,8 +84,6 @@ export const useLikeStore = defineStore('likes', { } } - await this.getAllLikesDislikes(collectionName, documentId) - this._isLoading = false } catch (error) { console.error('Error adding like:', error) @@ -124,8 +122,6 @@ export const useLikeStore = defineStore('likes', { } } - await this.getAllLikesDislikes(collectionName, documentId) - this._isLoading = false } catch (error) { console.error('Error adding dislike:', error) From b6b47fd6ae6862cc0dd54c34fc9863b4d2d398b9 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Thu, 12 Sep 2024 16:28:25 +0530 Subject: [PATCH 044/118] test update --- src/pages/SearchPage.vue | 2 +- src/stores/prompts.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/SearchPage.vue b/src/pages/SearchPage.vue index a18421a9..31acc7cc 100644 --- a/src/pages/SearchPage.vue +++ b/src/pages/SearchPage.vue @@ -176,7 +176,7 @@ function computeFetchPromptCount(height, width) { const widthFactor = width / 700 const computedCount = Math.round(basePromptCount + heightFactor * widthFactor) - +console.log('computeFetchPromptCount',computedCount) return computedCount } diff --git a/src/stores/prompts.js b/src/stores/prompts.js index 73617dc7..eeb1d8c2 100644 --- a/src/stores/prompts.js +++ b/src/stores/prompts.js @@ -93,7 +93,7 @@ export const usePromptStore = defineStore('prompts', { async fetchPrompts(loadMore = false, count) { const userStore = useUserStore() - + console.log('fetchPrompts called', loadMore, count) if (!userStore.getUsers) { await userStore.fetchAdminsAndEditors() } @@ -126,6 +126,7 @@ export const usePromptStore = defineStore('prompts', { } else { this._prompts = newPrompts } + console.log('total prompts', this._prompts.length) return newPrompts } catch (e) { console.error('Error fetching prompts:', e) From 3a7f51252ab4e4d01422c88406398c5d29f4a4d7 Mon Sep 17 00:00:00 2001 From: Lupanciuc Marc Date: Thu, 12 Sep 2024 14:43:13 +0300 Subject: [PATCH 045/118] feat:#548 added escrow id for entries on writers admin panel --- src/stores/entries.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/stores/entries.js b/src/stores/entries.js index fff725a5..27d4d886 100644 --- a/src/stores/entries.js +++ b/src/stores/entries.js @@ -108,9 +108,16 @@ export const useEntryStore = defineStore('entries', { const entries = snapshotDocs(querySnapshot.docs) for (const entry of entries) { + const promptId = entry.prompt.id if (entry.author.id) { entry.author = userStore.getUserById(entry.author.id) || (await userStore.fetchUser(entry.author.id)) } + + if (promptId && !entry.escrowId) { + const promptSnapshot = await getDocs(query(collection(db, 'prompts'), where('id', '==', promptId))) + const snap = promptSnapshot.docs.map((doc) => ({ id: doc.id, ...doc.data() }))[0] + entry.escrowId = snap.escrowId + } } this._userRelatedEntries = entries } catch (e) { From e213b0e8c14ea6cd7557a22ce8f8b65e5378182a Mon Sep 17 00:00:00 2001 From: Lupanciuc Marc Date: Thu, 12 Sep 2024 15:25:48 +0300 Subject: [PATCH 046/118] feat:#548 add escrowid on creation phase --- src/components/Admin/EntryCard.vue | 30 +++++++++++++++--------------- src/stores/entries.js | 8 +++++--- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/components/Admin/EntryCard.vue b/src/components/Admin/EntryCard.vue index 4e63b24d..9a20997f 100644 --- a/src/components/Admin/EntryCard.vue +++ b/src/components/Admin/EntryCard.vue @@ -27,20 +27,20 @@ + counter + data-test="input-title" + label="Title" + maxlength="80" + required + v-model="entry.title" + :hint="!entry.title ? '*Title is required' : ''" + /> @@ -232,7 +235,8 @@ function onDeleteDialog(entry) { async function onProceedPaymentDialog(props) { if (!_currentPrompt.value && props?.prompt?.id) { - _currentPrompt.value = await promptStore.fetchPromptById(props.prompt.id) + const fetchedPrompt = await promptStore.fetchPromptById(props.prompt.id) + _currentPrompt.value = Array.isArray(fetchedPrompt) && fetchedPrompt.length > 0 ? fetchedPrompt[0] : null } if (_currentPrompt.value) { $q.loading.show() @@ -240,11 +244,25 @@ async function onProceedPaymentDialog(props) { $q.notify({ type: 'negative', message: ' please connect your wallet ' }) customWeb3modal.open() $q.loading.hide() + // onProceedPaymentDialog.value.show = false } else { //let's check if the entry already have valid payment.. const cryptoTransactionExist = await cryptoTransactions.getCryptoTransactionsByEntry(props.id) if (cryptoTransactionExist.length > 0) { + const escrowEvents = await getEventsForEscrow({ escrowId: _currentPrompt.value.escrowId }) + + if (escrowEvents?.status?.includes('success')) { + displayCrytptoTransactionDialog.value.detail = { + amount: escrowEvents?.events?.releaseEvents[0]?.args.amount, + recipient: escrowEvents?.events?.releaseEvents[0]?.args.recipient + } + } else { + displayCrytptoTransactionDialog.value.detail = { + amount: '0', + recipient: '' + } + } displayCrytptoTransactionDialog.value.cryptoTransaction = cryptoTransactionExist[0] displayCrytptoTransactionDialog.value.show = true } else { @@ -338,22 +356,27 @@ async function onSelectWinner(entry) { if (_entry && _prompt) { emit('update-entry', { _entry, _prompt }) } - $q.notify({ type: 'positive', message: 'Succeed' }) + $q.notify({ type: 'positive', message: 'winner selected' }) $q.loading.hide() }) .catch((error) => { errorStore.throwError(error, 'Error selecting winner') $q.loading.hide() }) + .finally(() => { + selectWinnerDialog.value.show = false + }) selectWinnerDialog.value.show = false } else { $q.notify({ type: 'negative', message: 'oups winner selection failed ' }) $q.loading.hide() + selectWinnerDialog.value.show = false } } else { $q.notify({ type: 'negative', message: ' the entry author should set a wallet address ' }) $q.loading.hide() + selectWinnerDialog.value.show = false } } } diff --git a/src/components/Admin/WalletPaymentCard.vue b/src/components/Admin/WalletPaymentCard.vue index 1b6c6d8a..9a723678 100644 --- a/src/components/Admin/WalletPaymentCard.vue +++ b/src/components/Admin/WalletPaymentCard.vue @@ -101,6 +101,7 @@ async function onSubmit(event) { } else { $q.notify({ type: 'negative', message: 'funds released failed please retry' }) $q.loading.hide() + emit('hideDialog') } } catch (error) { $q.notify({ type: 'negative', message: 'oups transaction failed' }) diff --git a/src/web3/transfers.js b/src/web3/transfers.js index 89984ec5..908ffaa1 100644 --- a/src/web3/transfers.js +++ b/src/web3/transfers.js @@ -108,7 +108,6 @@ export const getTransactionDetails = async (txHash, networkName) => { // Fetch the transaction receipt to get the status const receipt = await provider.getTransactionReceipt(txHash) - // Extracting the desired information // Convert Wei to Ether for the transaction amount const amount = ethers.utils.formatEther(transaction.value) From 60fbf06de6e88f4bbcbc024afd6a0eac063b9e3a Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Thu, 12 Sep 2024 18:21:57 +0530 Subject: [PATCH 048/118] implemented-the-changes --- src/pages/SearchPage.vue | 27 ++++++++++++++------------- src/stores/prompts.js | 4 +--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/pages/SearchPage.vue b/src/pages/SearchPage.vue index 31acc7cc..0a53f2d8 100644 --- a/src/pages/SearchPage.vue +++ b/src/pages/SearchPage.vue @@ -61,7 +61,7 @@ import ItemCard from 'src/components/shared/ItemCard.vue' import TheEntries from 'src/components/shared/TheEntries.vue' import TheHeader from 'src/components/shared/TheHeader.vue' import { useAdvertiseStore, useEntryStore, useErrorStore, usePromptStore } from 'src/stores' -import { computed, ref ,onMounted,onUnmounted} from 'vue' +import { computed, ref, onMounted, onUnmounted } from 'vue' import { useRouter } from 'vue-router' const entryStore = useEntryStore() @@ -77,7 +77,8 @@ const scrollTopObserver = ref(null) const pageRef = ref(null) const loader = ref(false) -onUnmounted(()=>{ + +onUnmounted(() => { advertiseStore.reset() }) @@ -176,20 +177,20 @@ function computeFetchPromptCount(height, width) { const widthFactor = width / 700 const computedCount = Math.round(basePromptCount + heightFactor * widthFactor) -console.log('computeFetchPromptCount',computedCount) return computedCount } -onMounted(() => { - observer.value.focus() - initIntersectionObserver() - - const height = pageRef.value.$el.clientHeight - const width = pageRef.value.$el.clientWidth - const promptFetchCount = computeFetchPromptCount(height, width) - - advertiseStore.getActiveAdvertise().catch((error) => errorStore.throwError(error)) - promptStore.fetchPrompts(true, promptFetchCount).catch((error) => errorStore.throwError(error)) +onMounted(async() => { + try { + const height = pageRef.value.$el.clientHeight + const width = pageRef.value.$el.clientWidth + const promptFetchCount = computeFetchPromptCount(height, width) + await promptStore.fetchPrompts(true, promptFetchCount) + await advertiseStore.getActiveAdvertise() + initIntersectionObserver() + } catch (error) { + errorStore.throwError(error) + } }) diff --git a/src/stores/prompts.js b/src/stores/prompts.js index eeb1d8c2..0b1ca8ee 100644 --- a/src/stores/prompts.js +++ b/src/stores/prompts.js @@ -93,7 +93,6 @@ export const usePromptStore = defineStore('prompts', { async fetchPrompts(loadMore = false, count) { const userStore = useUserStore() - console.log('fetchPrompts called', loadMore, count) if (!userStore.getUsers) { await userStore.fetchAdminsAndEditors() } @@ -106,7 +105,7 @@ export const usePromptStore = defineStore('prompts', { if (loadMore && this._lastVisible) { queryRef = query(queryRef, orderBy('id', 'desc'), startAfter(this._lastVisible), limit(count ?? this.loadCount)) } else if (loadMore) { - queryRef = query(queryRef, orderBy('id', 'desc'), limit(this.loadCount)) + queryRef = query(queryRef, orderBy('id', 'desc'), limit(count ?? this.loadCount)) } const querySnapshot = await getDocs(queryRef) @@ -126,7 +125,6 @@ export const usePromptStore = defineStore('prompts', { } else { this._prompts = newPrompts } - console.log('total prompts', this._prompts.length) return newPrompts } catch (e) { console.error('Error fetching prompts:', e) From 100b898322eeaff517e9a62513ccf1c4bf050f51 Mon Sep 17 00:00:00 2001 From: Lupanciuc Marc Date: Thu, 12 Sep 2024 18:04:41 +0300 Subject: [PATCH 049/118] fixes #569 default prompt and entries instead of ads --- src/layouts/MainMenu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/MainMenu.vue b/src/layouts/MainMenu.vue index 21cf2e5c..c89730cb 100644 --- a/src/layouts/MainMenu.vue +++ b/src/layouts/MainMenu.vue @@ -60,7 +60,7 @@ function onLogout() { const onAdminTabClick = () => { if (userStore.isAuthenticated) { - router.push('/admin/advertises') + router.push('/admin/prompts') } else if (!isAdminPromptPath) { router.push('/admin/prompts') } else { From 1e4bb37542a0fff04c4e5f7e3b2d82e0514fd5ab Mon Sep 17 00:00:00 2001 From: Lupanciuc Marc Date: Thu, 12 Sep 2024 18:22:06 +0300 Subject: [PATCH 050/118] fix:#567 fix for entry not editable --- src/components/Admin/EntryCard.vue | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/Admin/EntryCard.vue b/src/components/Admin/EntryCard.vue index 4e63b24d..60d6635d 100644 --- a/src/components/Admin/EntryCard.vue +++ b/src/components/Admin/EntryCard.vue @@ -27,20 +27,20 @@ + counter + data-test="input-title" + label="Title" + maxlength="80" + required + v-model="entry.title" + :hint="!entry.title ? '*Title is required' : ''" + />