feat(ModerationReports): enhance moderation reports functionality and UI
All checks were successful
Deploy to production / deploy (push) Successful in 2m3s
All checks were successful
Deploy to production / deploy (push) Successful in 2m3s
- Added topic and forum IDs to moderation report queries for better context. - Updated admin interface to include links to open reported forum messages. - Implemented methods to handle opening target messages directly from the moderation reports view. - Enhanced internationalization support for new UI elements in both German and English. - Improved scrolling behavior to focus on specific messages when navigating to them.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<th>{{ $t('admin.moderationReports.reason') }}</th>
|
||||
<th>{{ $t('admin.moderationReports.reporter') }}</th>
|
||||
<th>{{ $t('admin.moderationReports.createdAt') }}</th>
|
||||
<th>{{ $t('admin.moderationReports.targetLink') }}</th>
|
||||
<th>{{ $t('admin.moderationReports.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -39,6 +40,15 @@
|
||||
</td>
|
||||
<td>{{ report.reporterUsername }}</td>
|
||||
<td>{{ formatDateTimeLong(report.createdAt) }}</td>
|
||||
<td>
|
||||
<button
|
||||
v-if="canOpenTarget(report)"
|
||||
type="button"
|
||||
@click="openTarget(report)"
|
||||
>
|
||||
{{ $t('admin.moderationReports.openTarget') }}
|
||||
</button>
|
||||
</td>
|
||||
<td class="actions-cell">
|
||||
<select v-model="draftStatus[report.id]">
|
||||
<option value="open">{{ $t('admin.moderationReports.status.open') }}</option>
|
||||
@@ -111,6 +121,13 @@ export default {
|
||||
showApiError(this, error, this.$t('admin.moderationReports.applyError'));
|
||||
}
|
||||
},
|
||||
canOpenTarget(report) {
|
||||
return report?.targetType === 'forum_message' && Number(report?.topicId) > 0;
|
||||
},
|
||||
openTarget(report) {
|
||||
if (!this.canOpenTarget(report)) return;
|
||||
this.$router.push(`/socialnetwork/forumtopic/${report.topicId}#msg-${report.targetId}`);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user