show groupPinned Messages on Group Page

This commit is contained in:
Ulf Gebhardt 2026-01-15 17:07:30 +01:00
parent 6be2f3ac9b
commit 66255c0be6
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 8 additions and 2 deletions

View File

@ -174,6 +174,10 @@ export default {
type: Object,
default: () => {},
},
showGroupPinned: {
type: Boolean,
default: false,
},
},
mounted() {
const { image } = this.post
@ -205,10 +209,11 @@ export default {
)
},
isPinned() {
return this.post && (this.post.pinned || this.post.groupPinned)
return this.post && (this.post.pinned || (this.showGroupPinned && this.post.groupPinned))
},
ribbonText() {
if (this.post.pinned || this.post.groupPinned) return this.$t('post.pinned')
if (this.post && (this.post.pinned || (this.showGroupPinned && this.post.groupPinned)))
return this.$t('post.pinned')
if (this.post.postType[0] === 'Event') return this.$t('post.event')
return this.$t('post.name')
},

View File

@ -243,6 +243,7 @@
<post-teaser
:post="post"
:width="{ base: '100%', md: '100%', xl: '50%' }"
:showGroupPinned="true"
@removePostFromList="posts = removePostFromList(post, posts)"
@pinPost="pinPost(post, refetchPostList)"
@unpinPost="unpinPost(post, refetchPostList)"