biome format --write
This commit is contained in:
parent
8372348148
commit
9262e803ec
415 changed files with 54076 additions and 17419 deletions
|
|
@ -5,42 +5,44 @@ import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
|||
const BlockCard = {
|
||||
props: ['userId'],
|
||||
computed: {
|
||||
user () {
|
||||
user() {
|
||||
return this.$store.getters.findUser(this.userId)
|
||||
},
|
||||
relationship () {
|
||||
relationship() {
|
||||
return this.$store.getters.relationship(this.userId)
|
||||
},
|
||||
blocked () {
|
||||
blocked() {
|
||||
return this.relationship.blocking
|
||||
},
|
||||
blockExpiryAvailable () {
|
||||
blockExpiryAvailable() {
|
||||
return this.user.block_expires_at !== undefined
|
||||
},
|
||||
blockExpiry () {
|
||||
blockExpiry() {
|
||||
return this.user.block_expires_at == null
|
||||
? this.$t('user_card.block_expires_forever')
|
||||
: this.$t('user_card.block_expires_at', [new Date(this.user.mute_expires_at).toLocaleString()])
|
||||
: this.$t('user_card.block_expires_at', [
|
||||
new Date(this.user.mute_expires_at).toLocaleString(),
|
||||
])
|
||||
},
|
||||
...mapState({
|
||||
blockExpirationSupported: state => state.instance.blockExpiration,
|
||||
})
|
||||
blockExpirationSupported: (state) => state.instance.blockExpiration,
|
||||
}),
|
||||
},
|
||||
components: {
|
||||
BasicUserCard
|
||||
BasicUserCard,
|
||||
},
|
||||
methods: {
|
||||
unblockUser () {
|
||||
unblockUser() {
|
||||
this.$store.dispatch('unblockUser', this.user.id)
|
||||
},
|
||||
blockUser () {
|
||||
blockUser() {
|
||||
if (this.blockExpirationSupported) {
|
||||
this.$refs.timedBlockDialog.optionallyPrompt()
|
||||
} else {
|
||||
this.$store.dispatch('blockUser', { id: this.user.id })
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default BlockCard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue