From 570c1784f3ffd2ede7c23f0b560ff2cca02b0df9 Mon Sep 17 00:00:00 2001 From: Parajuli Kiran Date: Mon, 22 Nov 2021 09:58:01 +0545 Subject: [PATCH] Linked publication detail page with api --- src/components/TheAppBar.vue | 9 +- src/components/feeds/FeedList.vue | 16 +- src/components/feeds/ItemActions.vue | 11 +- src/components/feeds/ItemHeader.vue | 14 +- src/components/feeds/ItemImages.vue | 4 +- src/components/utils/CommunityHoverBox.vue | 4 +- src/mixin/FetchMixin.js | 29 +++ src/mixin/RouteMixin.js | 12 +- src/router/index.js | 2 +- src/store/modules/publication.js | 3 + src/utils.js | 5 +- src/views/home/comment/FeedCommentItem.vue | 2 +- src/views/home/community/AboutCommunity.vue | 56 +++-- src/views/home/community/Community.vue | 218 ++++++++++-------- src/views/home/community/CommunityRules.vue | 8 +- .../home/community/MessageModerators.vue | 25 +- src/views/home/community/PostsList.vue | 17 +- src/views/home/community/Sidebar.vue | 19 +- src/views/home/community/WikiPage.vue | 70 +++++- .../community/register/Administration.vue | 2 +- src/views/home/publication/Publication.vue | 75 +++--- src/views/home/publication/Sidebar.vue | 8 +- 22 files changed, 392 insertions(+), 217 deletions(-) create mode 100644 src/mixin/FetchMixin.js diff --git a/src/components/TheAppBar.vue b/src/components/TheAppBar.vue index 9b52d40..de1c97a 100644 --- a/src/components/TheAppBar.vue +++ b/src/components/TheAppBar.vue @@ -34,7 +34,7 @@ @@ -69,7 +70,7 @@ placeholder="Search WordClub" > diff --git a/src/components/feeds/FeedList.vue b/src/components/feeds/FeedList.vue index 5dc6a7f..014667c 100644 --- a/src/components/feeds/FeedList.vue +++ b/src/components/feeds/FeedList.vue @@ -3,7 +3,6 @@ - ({ + is_published: true, + depth: 3 + }) + } + }, data: () => ({ isLoading: true }), @@ -53,12 +61,8 @@ export default { await this.fetchPublications() }, methods: { - deletePub(id) { - const url = this.$util.format(this.$urls.publication.detail, id) - this.$axios.delete(url) - }, async fetchPublications() { - await this.$store.dispatch("publication/filter", {is_published: true, depth: 3}) + await this.$store.dispatch("publication/filter", this.payload) this.isLoading = false } } diff --git a/src/components/feeds/ItemActions.vue b/src/components/feeds/ItemActions.vue index 426b281..57307ae 100644 --- a/src/components/feeds/ItemActions.vue +++ b/src/components/feeds/ItemActions.vue @@ -49,7 +49,7 @@ mdi-comment-outline - {{item.comments.length}} Comments + {{item.reactions.comments}} Comments