show expirety in user profile (currently broken?)

This commit is contained in:
Henry Jameson 2025-07-09 19:03:58 +03:00
commit 9f0b65654e
2 changed files with 22 additions and 1 deletions

View file

@ -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: {

View file

@ -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"