collapse notifications and also allow expand on click anywhere

This commit is contained in:
Henry Jameson 2025-08-14 12:53:19 +03:00
commit 0b9b7a51a6
5 changed files with 23 additions and 3 deletions

View file

@ -64,6 +64,7 @@ const Notification = {
},
methods: {
toggleStatusExpanded () {
if (!this.expandable) return
this.statusExpanded = !this.statusExpanded
},
generateUserProfileLink (user) {
@ -136,6 +137,9 @@ const Notification = {
const user = this.notification.from_profile
return highlightStyle(highlight[user.screen_name])
},
expandable () {
return (new Set(['like', '-pleroma:emoji_reaction', 'repeat'])).has(this.notification.type)
},
user () {
return this.$store.getters.findUser(this.notification.from_profile.id)
},