Sync develop with 2023.02 stable branch #6

Merged
fedward merged 102 commits from stable into develop 2023-02-12 19:20:33 +00:00
4 changed files with 25 additions and 24 deletions
Showing only changes of commit f8a796b234 - Show all commits

View file

@ -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: {

View file

@ -55,6 +55,20 @@
>
{{ $t('user_card.report') }}
</button>
<button
v-if="relationship.domain_blocking"
class="btn button-default btn-block dropdown-item"
@click="unmuteDomain"
>
{{ $t('user_card.domain_muted') }}
</button>
<button
v-else-if="!user.is_local"
class="btn button-default btn-block dropdown-item"
@click="muteDomain"
>
{{ $t('user_card.mute_domain') }}
</button>
</div>
</template>
<template v-slot:trigger>

View file

@ -154,14 +154,6 @@ export default {
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)
},

View file

@ -225,22 +225,6 @@
{{ $t('user_card.mute') }}
</button>
</div>
<div>
<button
v-if="relationship.domain_blocking"
class="btn button-default btn-block toggled"
@click="unmuteDomain"
>
{{ $t('user_card.domain_muted') }}
</button>
<button
v-else
class="btn button-default btn-block"
@click="muteDomain"
>
{{ $t('user_card.mute_domain') }}
</button>
</div>
<div>
<button
class="btn button-default btn-block"