Merge remote-tracking branch 'origin/develop' into 2-10-1-fixes
This commit is contained in:
commit
dcb7ed1b8c
428 changed files with 55612 additions and 18549 deletions
|
|
@ -1,39 +1,41 @@
|
|||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
import UserTimedFilterModal from 'src/components/user_timed_filter_modal/user_timed_filter_modal.vue'
|
||||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
|
||||
const MuteCard = {
|
||||
props: ['userId'],
|
||||
computed: {
|
||||
user () {
|
||||
user() {
|
||||
return this.$store.getters.findUser(this.userId)
|
||||
},
|
||||
relationship () {
|
||||
relationship() {
|
||||
return this.$store.getters.relationship(this.userId)
|
||||
},
|
||||
muted () {
|
||||
muted() {
|
||||
return this.relationship.muting
|
||||
},
|
||||
muteExpiryAvailable () {
|
||||
muteExpiryAvailable() {
|
||||
return Object.hasOwn(this.user, 'mute_expires_at')
|
||||
},
|
||||
muteExpiry () {
|
||||
muteExpiry() {
|
||||
return this.user.mute_expires_at === false
|
||||
? this.$t('user_card.mute_expires_forever')
|
||||
: this.$t('user_card.mute_expires_at', [new Date(this.user.mute_expires_at).toLocaleString()])
|
||||
}
|
||||
: this.$t('user_card.mute_expires_at', [
|
||||
new Date(this.user.mute_expires_at).toLocaleString(),
|
||||
])
|
||||
},
|
||||
},
|
||||
components: {
|
||||
BasicUserCard,
|
||||
UserTimedFilterModal
|
||||
UserTimedFilterModal,
|
||||
},
|
||||
methods: {
|
||||
unmuteUser () {
|
||||
unmuteUser() {
|
||||
this.$store.dispatch('unmuteUser', this.userId)
|
||||
},
|
||||
muteUser () {
|
||||
muteUser() {
|
||||
this.$refs.timedMuteDialog.optionallyPrompt()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default MuteCard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue