diff --git a/src/router/index.js b/src/router/index.js index b61e7b44..60be0f88 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -199,5 +199,17 @@ export const asyncRouterMap = [ ], hidden: true }, + { + path: '/reports/:id', + component: Layout, + children: [ + { + path: '', + name: 'ReportsShow', + component: () => import('@/views/reports/show') + } + ], + hidden: true + }, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/views/moderation_log/LogEntryMessage.vue b/src/views/moderation_log/LogEntryMessage.vue index d9cc8547..d19ada81 100644 --- a/src/views/moderation_log/LogEntryMessage.vue +++ b/src/views/moderation_log/LogEntryMessage.vue @@ -8,7 +8,16 @@ @{{ actor.nickname }} - {{ logEntryMessage }} + + {{ logEntryMessageWithoutId[0] }} + + #{{ subject.id }} + + {{ logEntryMessageWithoutId[1] }} + + {{ logEntryMessage }} @@ -24,11 +33,21 @@ export default { message: { type: String, required: true + }, + subject: { + type: [Object, Array], + required: false, + default: function() { + return {} + } } }, computed: { logEntryMessage() { - return this.message.split(this.actor.nickname)[1] + return this.actor.nickname ? this.message.split(this.actor.nickname)[1] : this.message + }, + logEntryMessageWithoutId() { + return this.logEntryMessage.split(`#${this.subject.id}`) } }, methods: { diff --git a/src/views/moderation_log/index.vue b/src/views/moderation_log/index.vue index af123e22..283bf4d2 100644 --- a/src/views/moderation_log/index.vue +++ b/src/views/moderation_log/index.vue @@ -43,7 +43,7 @@ v-for="(logEntry, index) in log" :key="index" :timestamp="normalizeTimestamp(logEntry.time)"> - + {{ logEntry.message }}