show expirety in user profile (currently broken?)
This commit is contained in:
parent
2441e6508d
commit
9f0b65654e
2 changed files with 22 additions and 1 deletions
|
|
@ -77,7 +77,6 @@ export default {
|
||||||
return this.$store.getters.findUser(this.userId)
|
return this.$store.getters.findUser(this.userId)
|
||||||
},
|
},
|
||||||
relationship () {
|
relationship () {
|
||||||
console.log(this.$store.getters.relationship(this.userId))
|
|
||||||
return this.$store.getters.relationship(this.userId)
|
return this.$store.getters.relationship(this.userId)
|
||||||
},
|
},
|
||||||
classes () {
|
classes () {
|
||||||
|
|
@ -160,6 +159,16 @@ export default {
|
||||||
supportsNote () {
|
supportsNote () {
|
||||||
return 'note' in this.relationship
|
return 'note' in this.relationship
|
||||||
},
|
},
|
||||||
|
muteExpiry () {
|
||||||
|
return this.user.mute_expires_at == null
|
||||||
|
? this.$t('user_card.mute_expires_forever')
|
||||||
|
: this.$t('user_card.mute_expires_at', [new Date(this.user.mute_expires_at).toLocaleString()])
|
||||||
|
},
|
||||||
|
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()])
|
||||||
|
},
|
||||||
...mapGetters(['mergedConfig'])
|
...mapGetters(['mergedConfig'])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,18 @@
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="relationship.muting"
|
||||||
|
class="alert neutral user-role"
|
||||||
|
>
|
||||||
|
{{ muteExpiry }}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="relationship.blocking"
|
||||||
|
class="alert neutral user-role"
|
||||||
|
>
|
||||||
|
{{ blockExpiry }}
|
||||||
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="!mergedConfig.hideUserStats && !hideBio"
|
v-if="!mergedConfig.hideUserStats && !hideBio"
|
||||||
class="dailyAvg"
|
class="dailyAvg"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue