From 81d1e0fdabca8ce060b80a0ddd3aae599fe91bf0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 6 Apr 2024 02:27:22 -0600 Subject: [PATCH] Update context menu, add mute/block/unfollow actions and update relationship store accordingly --- .../components/partials/post/ContextMenu.vue | 1648 ++++++++++------- .../assets/components/sections/Timeline.vue | 18 + 2 files changed, 951 insertions(+), 715 deletions(-) diff --git a/resources/assets/components/partials/post/ContextMenu.vue b/resources/assets/components/partials/post/ContextMenu.vue index 655499d33..ad94da335 100644 --- a/resources/assets/components/partials/post/ContextMenu.vue +++ b/resources/assets/components/partials/post/ContextMenu.vue @@ -1,803 +1,1021 @@ + + diff --git a/resources/assets/components/sections/Timeline.vue b/resources/assets/components/sections/Timeline.vue index ea215d895..2d23d5909 100644 --- a/resources/assets/components/sections/Timeline.vue +++ b/resources/assets/components/sections/Timeline.vue @@ -91,6 +91,8 @@ v-on:delete="deletePost" v-on:report-modal="handleReport" v-on:edit="handleEdit" + v-on:muted="handleMuted" + v-on:unfollow="handleUnfollow" /> { }) }, + + handleMuted(post) { + this.feed = this.feed.filter(p => { + return p.account.id !== post.account.id; + }); + }, + + handleUnfollow(post) { + if(this.scope === 'home') { + this.feed = this.feed.filter(p => { + return p.account.id !== post.account.id; + }); + } + this.updateProfile({ following_count: this.profile.following_count - 1 }); + }, }, watch: {