From 862c93706cc51b3e53483dde21ead248058285e7 Mon Sep 17 00:00:00 2001 From: astra Date: Fri, 18 Nov 2022 08:49:57 -0500 Subject: [PATCH] move domain block to drop down menu --- .../account_actions/account_actions.js | 11 +++++++++++ .../account_actions/account_actions.vue | 14 ++++++++++++++ src/components/user_card/user_card.js | 8 -------- src/components/user_card/user_card.vue | 16 ---------------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index 7a712e31..0f348474 100644 --- a/src/components/account_actions/account_actions.js +++ b/src/components/account_actions/account_actions.js @@ -26,6 +26,9 @@ const AccountActions = { ConfirmModal }, methods: { + refetchRelationship () { + return this.$store.dispatch('fetchUserRelationship', this.user.id) + }, showConfirmBlock () { this.showingConfirmBlock = true }, @@ -57,6 +60,14 @@ const AccountActions = { }, reportUser () { this.$store.dispatch('openUserReportingModal', { userId: this.user.id }) + }, + muteDomain () { + this.$store.dispatch('muteDomain', this.user.screen_name.split('@')[1]) + .then(() => this.refetchRelationship()) + }, + unmuteDomain () { + this.$store.dispatch('unmuteDomain', this.user.screen_name.split('@')[1]) + .then(() => this.refetchRelationship()) } }, computed: { diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 2f86b102..126f6fa9 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -55,6 +55,20 @@ > {{ $t('user_card.report') }} + +