show expiry only if available
This commit is contained in:
parent
9f0b65654e
commit
35c2e87131
6 changed files with 16 additions and 5 deletions
|
|
@ -14,8 +14,10 @@ const BlockCard = {
|
|||
blocked () {
|
||||
return this.relationship.blocking
|
||||
},
|
||||
blockExpiryAvailable () {
|
||||
return this.user.block_expires_at !== undefined
|
||||
},
|
||||
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()])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<basic-user-card :user="user">
|
||||
<div class="block-card-content-container">
|
||||
<span v-if="blocked" class="alert neutral">
|
||||
<span v-if="blocked && blockExpiryAvailable" class="alert neutral">
|
||||
{{ blockExpiry }}
|
||||
</span>
|
||||
{{ ' ' }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue