feat(Moderation): implement moderation reports feature
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s
- Added moderationRouter to handle moderation-related API routes. - Introduced new methods in AdminController for fetching all regions, region types, and creating regions. - Enhanced adminRouter with routes for moderation reports and status updates. - Updated navigationController to include moderation reports in the admin menu. - Implemented frontend components for reporting messages in the forum and managing moderation reports. - Added internationalization support for moderation-related texts in multiple languages.
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
<span>{{ $t('appShell.header.tagline') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-ad" v-if="showHeaderAd">
|
||||
<ins
|
||||
class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-1104166651501135"
|
||||
:data-ad-slot="adSlotId"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"
|
||||
></ins>
|
||||
</div>
|
||||
<div class="header-meta">
|
||||
<div class="header-meta__context">
|
||||
<span class="header-pill">{{ $t('appShell.header.beta') }}</span>
|
||||
@@ -49,6 +59,7 @@ export default {
|
||||
name: 'AppHeader',
|
||||
data() {
|
||||
return {
|
||||
adInitialized: false,
|
||||
/** Endonyme: jede Sprache bezeichnet sich in ihrer eigenen Sprache. */
|
||||
uiLocaleOptions: [
|
||||
{ value: 'de', nativeLabel: 'Deutsch' },
|
||||
@@ -76,9 +87,49 @@ export default {
|
||||
'status-disconnected': this.daemonConnectionStatus === 'disconnected',
|
||||
'status-error': this.daemonConnectionStatus === 'error'
|
||||
};
|
||||
},
|
||||
showHeaderAd() {
|
||||
if (!this.adSlotId) {
|
||||
return false;
|
||||
}
|
||||
const path = this.$route?.path || '';
|
||||
// Anzeigen bevorzugt auf Bereichen mit dauerhaftem, inhaltlich starkem Content.
|
||||
return (
|
||||
path === '/' ||
|
||||
path.startsWith('/blogs') ||
|
||||
path.startsWith('/socialnetwork/forum') ||
|
||||
path.startsWith('/socialnetwork/forumtopic') ||
|
||||
path.startsWith('/socialnetwork/vocab/courses') ||
|
||||
path.startsWith('/falukant/home')
|
||||
);
|
||||
},
|
||||
adSlotId() {
|
||||
const slot = String(import.meta.env.VITE_ADSENSE_HEADER_SLOT || '').trim();
|
||||
return /^\d{6,}$/.test(slot) ? slot : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
showHeaderAd: {
|
||||
immediate: true,
|
||||
handler(next) {
|
||||
if (next) {
|
||||
this.$nextTick(() => this.initHeaderAd());
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initHeaderAd() {
|
||||
if (!this.showHeaderAd) return;
|
||||
if (this.adInitialized) return;
|
||||
if (typeof window === 'undefined' || !window.adsbygoogle) return;
|
||||
try {
|
||||
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
||||
this.adInitialized = true;
|
||||
} catch (err) {
|
||||
console.warn('AppHeader: adsense slot init failed', err);
|
||||
}
|
||||
},
|
||||
async onUiLanguageChange(code) {
|
||||
if (!SUPPORTED_UI_LOCALES.includes(code)) {
|
||||
return;
|
||||
@@ -144,7 +195,7 @@ export default {
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
@@ -197,6 +248,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.header-ad {
|
||||
flex: 1 1 260px;
|
||||
min-width: 180px;
|
||||
max-width: 560px;
|
||||
}
|
||||
|
||||
.header-ad .adsbygoogle {
|
||||
min-height: 54px;
|
||||
}
|
||||
|
||||
.header-meta__context {
|
||||
@@ -327,6 +389,13 @@ export default {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.header-ad {
|
||||
order: 3;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.header-meta {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -73,6 +73,7 @@ const TITLE_MAP = {
|
||||
AdminUsers: 'sectionBar.titles.adminUsers',
|
||||
AdminUserStatistics: 'sectionBar.titles.adminUserStatistics',
|
||||
AdminContacts: 'sectionBar.titles.adminContacts',
|
||||
AdminModerationReports: 'sectionBar.titles.adminModerationReports',
|
||||
AdminUserRights: 'sectionBar.titles.adminUserRights',
|
||||
AdminForums: 'sectionBar.titles.adminForums',
|
||||
AdminChatRooms: 'sectionBar.titles.adminChatRooms',
|
||||
|
||||
Reference in New Issue
Block a user