mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-15 01:14:39 +00:00
Cleanup
This commit is contained in:
parent
ad4e252c67
commit
db7908139c
@ -60,10 +60,10 @@ const validateUpdatePost = async (resolve, root, args, context, info) => {
|
||||
return validatePost(resolve, root, args, context, info)
|
||||
}
|
||||
|
||||
const validateReport = async (resolve, root, args, context, info) => {
|
||||
const validateFiledReport = async (resolve, root, args, context, info) => {
|
||||
const { resourceId } = args
|
||||
const { user } = context
|
||||
if (resourceId === user.id) throw new Error('You cannot report yourself!')
|
||||
if (resourceId === user.id) throw new Error("You can't file a report about yourself!")
|
||||
return resolve(root, args, context, info)
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
CreatePost: validatePost,
|
||||
UpdatePost: validateUpdatePost,
|
||||
UpdateUser: validateUpdateUser,
|
||||
fileReport: validateReport,
|
||||
fileReport: validateFiledReport,
|
||||
review: validateReview,
|
||||
},
|
||||
}
|
||||
|
||||
@ -236,14 +236,14 @@ describe('Notification', () => {
|
||||
expect(wrapper.text()).toContain('@mrs.-badwomen')
|
||||
})
|
||||
|
||||
it('renders the identifier "notifications.report.category"', () => {
|
||||
it('renders the identifier "notifications.filedReport.category"', () => {
|
||||
wrapper = Wrapper()
|
||||
expect(wrapper.text()).toContain('notifications.report.category')
|
||||
expect(wrapper.text()).toContain('notifications.filedReport.category')
|
||||
})
|
||||
|
||||
it('renders the identifier "notifications.report.description"', () => {
|
||||
it('renders the identifier "notifications.filedReport.description"', () => {
|
||||
wrapper = Wrapper()
|
||||
expect(wrapper.text()).toContain('notifications.report.description')
|
||||
expect(wrapper.text()).toContain('notifications.filedReport.description')
|
||||
})
|
||||
|
||||
it('has no class "read"', () => {
|
||||
|
||||
@ -29,10 +29,10 @@
|
||||
</p>
|
||||
<div v-if="notificationData.isReport">
|
||||
<ds-space margin-bottom="x-small" />
|
||||
<strong>{{ $t(`notifications.report.category`) }}:</strong>
|
||||
<strong>{{ $t(`notifications.filedReport.category`) }}:</strong>
|
||||
{{ $t('report.reason.category.options.' + notificationData.filedReport.reasonCategory) }}
|
||||
<br />
|
||||
<strong>{{ $t(`notifications.report.description`) }}:</strong>
|
||||
<strong>{{ $t(`notifications.filedReport.description`) }}:</strong>
|
||||
<span
|
||||
v-if="
|
||||
notificationData.filedReport.reasonDescription &&
|
||||
|
||||
@ -178,9 +178,9 @@ describe('NotificationsTable.vue', () => {
|
||||
expect(wrapper.text()).toContain('@mrs.-badwomen')
|
||||
})
|
||||
|
||||
it('renders the identifier "notifications.report.category"', () => {
|
||||
it('renders the identifier "notifications.filedReport.category"', () => {
|
||||
wrapper = Wrapper()
|
||||
expect(wrapper.text()).toContain('notifications.report.category')
|
||||
expect(wrapper.text()).toContain('notifications.filedReport.category')
|
||||
})
|
||||
|
||||
it('renders the reported category', () => {
|
||||
@ -190,9 +190,9 @@ describe('NotificationsTable.vue', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('renders the identifier "notifications.report.description"', () => {
|
||||
it('renders the identifier "notifications.filedReport.description"', () => {
|
||||
wrapper = Wrapper()
|
||||
expect(wrapper.text()).toContain('notifications.report.description')
|
||||
expect(wrapper.text()).toContain('notifications.filedReport.description')
|
||||
})
|
||||
|
||||
it('renders the reported description', () => {
|
||||
|
||||
@ -46,12 +46,12 @@
|
||||
<div v-if="scope.row.isReport" :class="{ 'notification-status': scope.row.read }">
|
||||
<ds-space margin-bottom="x-small" />
|
||||
<span class="notification-content-header-text">
|
||||
{{ $t(`notifications.report.category`) }}:
|
||||
{{ $t(`notifications.filedReport.category`) }}:
|
||||
</span>
|
||||
{{ $t('report.reason.category.options.' + scope.row.filedReport.reasonCategory) }}
|
||||
<br />
|
||||
<span class="notification-content-header-text">
|
||||
{{ $t(`notifications.report.description`) }}:
|
||||
{{ $t(`notifications.filedReport.description`) }}:
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
|
||||
@ -171,7 +171,7 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
|
||||
}
|
||||
isReport = true
|
||||
iconName = 'balance-scale'
|
||||
iconTooltip = 'notifications.report.name'
|
||||
iconTooltip = 'notifications.filedReport.name'
|
||||
triggerer = currentUser
|
||||
switch (from.resource.__typename) {
|
||||
case 'User':
|
||||
|
||||
@ -462,10 +462,10 @@
|
||||
"mentioned_in_comment": "Hat dich in einem Kommentar erwähnt …",
|
||||
"mentioned_in_post": "Hat dich in einem Beitrag erwähnt …"
|
||||
},
|
||||
"report": {
|
||||
"filedReport": {
|
||||
"category": "Kategorie der Meldung",
|
||||
"description": "Beschreibung",
|
||||
"name": "Meldung"
|
||||
"name": "Gesendete Meldung"
|
||||
},
|
||||
"title": "Benachrichtigungen",
|
||||
"user": "Benutzer"
|
||||
|
||||
@ -462,10 +462,10 @@
|
||||
"mentioned_in_comment": "Mentioned you in a comment …",
|
||||
"mentioned_in_post": "Mentioned you in a post …"
|
||||
},
|
||||
"report": {
|
||||
"filedReport": {
|
||||
"category": "Report category",
|
||||
"description": "Description",
|
||||
"name": "Report"
|
||||
"name": "Filed report"
|
||||
},
|
||||
"title": "Notifications",
|
||||
"user": "User"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user