From cda1819d8178862eeb9b0fe1fc2d62e23d4e85c6 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 21 May 2021 11:35:50 +0100 Subject: [PATCH] Add domain block components --- src/components/user_card/user_card.js | 11 +++++++++++ src/components/user_card/user_card.vue | 16 ++++++++++++++++ src/i18n/en.json | 2 ++ 3 files changed, 29 insertions(+) diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 3a8efafc..c641b7ba 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -121,12 +121,23 @@ export default { FollowButton }, methods: { + refetchRelationship () { + return this.$store.dispatch('fetchUserRelationship', this.user.id) + }, muteUser () { this.$store.dispatch('muteUser', this.user.id) }, unmuteUser () { this.$store.dispatch('unmuteUser', 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()) + }, subscribeUser () { return this.$store.dispatch('subscribeUser', this.user.id) }, diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 4b7ee7d5..3d5d1172 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -205,6 +205,22 @@ {{ $t('user_card.mute') }} +
+ + +