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>
|
<template>
|
||||||
<article :class="{ '--read': notification.read, notification: true }">
|
<article :class="{ '--read': notification.read, notification: true }">
|
||||||
<client-only>
|
<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>
|
</client-only>
|
||||||
<p class="description">{{ $t(`notifications.reason.${notification.reason}`) }}</p>
|
<p class="description">{{ $t(`notifications.reason.${notification.reason}`) }}</p>
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
class="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')"
|
@click.native="$emit('read')"
|
||||||
>
|
>
|
||||||
<base-card wideContent>
|
<base-card wideContent>
|
||||||
@ -38,9 +38,6 @@ export default {
|
|||||||
from() {
|
from() {
|
||||||
return this.notification.from
|
return this.notification.from
|
||||||
},
|
},
|
||||||
to() {
|
|
||||||
return this.notification.to
|
|
||||||
},
|
|
||||||
isComment() {
|
isComment() {
|
||||||
return this.from.__typename === 'Comment'
|
return this.from.__typename === 'Comment'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
<client-only>
|
<client-only>
|
||||||
<user-teaser
|
<user-teaser
|
||||||
:user="
|
:user="
|
||||||
isGroup(notification.from) ? notification.to : notification.from.author
|
isGroup(notification.from) ? notification.relatedUser : notification.from.author
|
||||||
"
|
"
|
||||||
:date-time="notification.from.createdAt"
|
:date-time="notification.from.createdAt"
|
||||||
:class="{ 'notification-status': notification.read }"
|
:class="{ 'notification-status': notification.read }"
|
||||||
@ -63,7 +63,7 @@
|
|||||||
class="notification-mention-post"
|
class="notification-mention-post"
|
||||||
:class="{ 'notification-status': notification.read }"
|
:class="{ 'notification-status': notification.read }"
|
||||||
:to="{
|
:to="{
|
||||||
name: isGroup(notification.from) ? 'group' : 'post-id-slug',
|
name: isGroup(notification.from) ? 'group-id-slug' : 'post-id-slug',
|
||||||
params: params(notification.from),
|
params: params(notification.from),
|
||||||
hash: hashParam(notification.from),
|
hash: hashParam(notification.from),
|
||||||
}"
|
}"
|
||||||
|
|||||||
@ -150,6 +150,9 @@ export const notificationQuery = (_i18n) => {
|
|||||||
...group
|
...group
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
relatedUser {
|
||||||
|
...user
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user