feat(ModerationReports): enhance moderation reports functionality and UI
- 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:
@@ -10,7 +10,7 @@
|
||||
|
||||
<section class="forum-topic-messages">
|
||||
<ul class="messages">
|
||||
<li v-for="message in messages" :key="message.id" class="surface-card">
|
||||
<li v-for="message in messages" :key="message.id" :id="`msg-${message.id}`" class="surface-card">
|
||||
<div v-html="sanitizedMessage(message)"></div>
|
||||
<div class="footer">
|
||||
<span class="footer-left">
|
||||
@@ -85,6 +85,7 @@ export default {
|
||||
this.forumName = data.forum.name;
|
||||
this.forumId = data.forum.id;
|
||||
this.messages = data.messages;
|
||||
this.$nextTick(() => this.scrollToHashIfPresent());
|
||||
},
|
||||
async openProfile(id) {
|
||||
this.$root.$refs.userProfileDialog.userId = id;
|
||||
@@ -138,6 +139,14 @@ export default {
|
||||
this.$t('error.title')
|
||||
);
|
||||
}
|
||||
},
|
||||
scrollToHashIfPresent() {
|
||||
const hash = this.$route?.hash || '';
|
||||
if (!hash || hash.length < 2) return;
|
||||
const el = document.querySelector(hash);
|
||||
if (el && typeof el.scrollIntoView === 'function') {
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user