mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-15 01:14:39 +00:00
Clarified variable naming
This commit is contained in:
parent
ff620171b2
commit
63f36f02b4
@ -21,7 +21,7 @@
|
||||
v-tooltip="{ content: $t('notifications.post'), placement: 'right' }"
|
||||
/>
|
||||
{{
|
||||
$t(`notifications.reason.${notificationData.reason}` + notificationData.reasonExtention)
|
||||
$t(`notifications.reason.${notificationData.reason}` + notificationData.reasonTranslationExtention)
|
||||
}}
|
||||
</ds-text>
|
||||
</client-only>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
</client-only>
|
||||
</ds-space>
|
||||
<ds-text :class="{ 'notification-status': scope.row.read, reason: true }">
|
||||
{{ $t(`notifications.reason.${scope.row.reason}` + scope.row.reasonExtention) }}
|
||||
{{ $t(`notifications.reason.${scope.row.reason}` + scope.row.reasonTranslationExtention) }}
|
||||
</ds-text>
|
||||
</template>
|
||||
<template #post="scope">
|
||||
@ -43,7 +43,7 @@
|
||||
data-test="notification-title-link"
|
||||
:class="{ 'notification-status': scope.row.read }"
|
||||
:to="scope.row.linkTo"
|
||||
@click.native="markNotificationAsRead(scope.row.id)"
|
||||
@click.native="markNotificationAsRead(scope.row.notificationSourceId)"
|
||||
>
|
||||
<b>{{ scope.row.title | truncate(50) }}</b>
|
||||
</nuxt-link>
|
||||
|
||||
@ -69,7 +69,7 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
|
||||
let comment = null
|
||||
let contentExcerpt = null
|
||||
let report = null
|
||||
let reasonExtention = ''
|
||||
let reasonTranslationExtention = ''
|
||||
let triggerer
|
||||
let title
|
||||
let author
|
||||
@ -101,16 +101,16 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
|
||||
switch (filed.reportedResource.__typename) {
|
||||
case 'User':
|
||||
user = filed.reportedResource
|
||||
reasonExtention = '.user'
|
||||
reasonTranslationExtention = '.user'
|
||||
break
|
||||
case 'Comment':
|
||||
comment = filed.reportedResource
|
||||
post = filed.reportedResource.post
|
||||
reasonExtention = '.comment'
|
||||
reasonTranslationExtention = '.comment'
|
||||
break
|
||||
case 'Post':
|
||||
post = filed.reportedResource
|
||||
reasonExtention = '.post'
|
||||
reasonTranslationExtention = '.post'
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -146,7 +146,7 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
|
||||
createdAt: notification.createdAt,
|
||||
read: notification.read,
|
||||
reason: notification.reason,
|
||||
id: from.id,
|
||||
notificationSourceId: from.id,
|
||||
triggerer,
|
||||
user,
|
||||
comment,
|
||||
@ -155,7 +155,7 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
|
||||
title,
|
||||
contentExcerpt,
|
||||
report,
|
||||
reasonExtention,
|
||||
reasonTranslationExtention,
|
||||
linkTo: { name: linkName, params: linkParams, ...linkHashParam },
|
||||
}
|
||||
return data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user