diff --git a/components/ReportModal.vue b/components/ReportModal.vue index f06fdcb3b..52b31cbd5 100644 --- a/components/ReportModal.vue +++ b/components/ReportModal.vue @@ -73,7 +73,7 @@ export default { this.$apollo .mutate({ mutation: gql` - mutation($id: ID!, $type: _ResourceType!, $description: String) { + mutation($id: ID!, $type: ResourceEnum!, $description: String) { report( resource: { id: $id, type: $type } description: $description diff --git a/layouts/default.vue b/layouts/default.vue index 01f883b1e..27bf5f94d 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -101,6 +101,7 @@ export default { ...mapGetters({ user: 'auth/user', isLoggedIn: 'auth/isLoggedIn', + isModerator: 'auth/isModerator', isAdmin: 'auth/isAdmin' }), routes() { @@ -119,6 +120,13 @@ export default { icon: 'cogs' } ] + if (this.isModerator) { + routes.push({ + name: this.$t('moderation.name'), + path: `/moderation`, + icon: 'balance-scale' + }) + } if (this.isAdmin) { routes.push({ name: this.$t('admin.name'), diff --git a/locales/de.json b/locales/de.json index 12cb611d1..11a4a179c 100644 --- a/locales/de.json +++ b/locales/de.json @@ -81,6 +81,13 @@ "name": "Einstellungen" } }, + "moderation": { + "name": "Moderation", + "reports": { + "name": "Meldungen", + "reporter": "gemeldet von" + } + }, "post": { "name": "Beitrag", "moreInfo": { diff --git a/locales/en.json b/locales/en.json index 87c48e550..3556b08cf 100644 --- a/locales/en.json +++ b/locales/en.json @@ -81,6 +81,13 @@ "name": "Settings" } }, + "moderation": { + "name": "Moderation", + "reports": { + "name": "Reports", + "reporter": "reported by" + } + }, "post": { "name": "Post", "moreInfo": { diff --git a/pages/moderation.vue b/pages/moderation.vue new file mode 100644 index 000000000..16070ae35 --- /dev/null +++ b/pages/moderation.vue @@ -0,0 +1,35 @@ + + + + {{ $t('moderation.name') }} + + + + + + + + + + + + + + + diff --git a/pages/moderation/index.vue b/pages/moderation/index.vue new file mode 100644 index 000000000..62c5c4648 --- /dev/null +++ b/pages/moderation/index.vue @@ -0,0 +1,140 @@ + + + + {{ $t('moderation.reports.name') }} + + + + + + {{ scope.row.contribution.title | truncate(50) }} + + + + + {{ scope.row.comment.contentExcerpt | truncate(50) }} + + + + + {{ scope.row.user.name | truncate(50) }} + + + + {{ scope.row.type }} + + + + + {{ scope.row.reporter.name }} + + + + + + + + + + + + Actions... + + + + + + + + +