block/mute cards update to show expiry and ask for it
This commit is contained in:
parent
385f921c41
commit
8436f39eff
6 changed files with 48 additions and 47 deletions
|
|
@ -2,11 +2,6 @@ import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
|||
|
||||
const BlockCard = {
|
||||
props: ['userId'],
|
||||
data () {
|
||||
return {
|
||||
progress: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
user () {
|
||||
return this.$store.getters.findUser(this.userId)
|
||||
|
|
@ -16,6 +11,12 @@ const BlockCard = {
|
|||
},
|
||||
blocked () {
|
||||
return this.relationship.blocking
|
||||
},
|
||||
blockExpiry () {
|
||||
console.log(this.user)
|
||||
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()])
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
@ -29,10 +30,7 @@ const BlockCard = {
|
|||
})
|
||||
},
|
||||
blockUser () {
|
||||
this.progress = true
|
||||
this.$store.dispatch('blockUser', this.user.id).then(() => {
|
||||
this.progress = false
|
||||
})
|
||||
this.$refs.timedBlockDialog.optionallyPrompt()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue