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