mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
related user for group notifications
This commit is contained in:
parent
997dff4dec
commit
ab58c569d0
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<article :class="{ '--read': notification.read, notification: true }">
|
||||
<client-only>
|
||||
<user-teaser :user="isGroup ? to : from.author" :date-time="from.createdAt" />
|
||||
<user-teaser :user="isGroup ? notification.relatedUser : from.author" :date-time="from.createdAt" />
|
||||
</client-only>
|
||||
<p class="description">{{ $t(`notifications.reason.${notification.reason}`) }}</p>
|
||||
<nuxt-link
|
||||
class="link"
|
||||
:to="{ name: isGroup ? 'group' : 'post-id-slug', params, hashParam }"
|
||||
:to="{ name: isGroup ? 'group-id-slug' : 'post-id-slug', params, hashParam }"
|
||||
@click.native="$emit('read')"
|
||||
>
|
||||
<base-card wideContent>
|
||||
@ -38,9 +38,6 @@ export default {
|
||||
from() {
|
||||
return this.notification.from
|
||||
},
|
||||
to() {
|
||||
return this.notification.to
|
||||
},
|
||||
isComment() {
|
||||
return this.from.__typename === 'Comment'
|
||||
},
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<client-only>
|
||||
<user-teaser
|
||||
:user="
|
||||
isGroup(notification.from) ? notification.to : notification.from.author
|
||||
isGroup(notification.from) ? notification.relatedUser : notification.from.author
|
||||
"
|
||||
:date-time="notification.from.createdAt"
|
||||
:class="{ 'notification-status': notification.read }"
|
||||
@ -63,7 +63,7 @@
|
||||
class="notification-mention-post"
|
||||
:class="{ 'notification-status': notification.read }"
|
||||
:to="{
|
||||
name: isGroup(notification.from) ? 'group' : 'post-id-slug',
|
||||
name: isGroup(notification.from) ? 'group-id-slug' : 'post-id-slug',
|
||||
params: params(notification.from),
|
||||
hash: hashParam(notification.from),
|
||||
}"
|
||||
|
||||
@ -150,6 +150,9 @@ export const notificationQuery = (_i18n) => {
|
||||
...group
|
||||
}
|
||||
}
|
||||
relatedUser {
|
||||
...user
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user