Add adult verification and erotic moderation features: Implement new routes and controller methods for managing adult verification requests, status updates, and document retrieval. Introduce erotic moderation actions and reports, enhancing administrative capabilities. Update chat and navigation controllers to support adult content filtering and access control. Enhance user parameter handling for adult verification status and requests, improving overall user experience and compliance.
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
<input type="checkbox" v-model="localRoom.isPublic" />
|
||||
{{ $t('admin.chatrooms.isPublic') }}
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" v-model="localRoom.isAdultOnly" />
|
||||
{{ $t('admin.chatrooms.isAdultOnly') }}
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" v-model="showGenderRestriction" />
|
||||
{{ $t('admin.chatrooms.genderRestriction.show') }}
|
||||
@@ -84,7 +88,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialog: null,
|
||||
localRoom: this.room ? { ...this.room } : { title: '', isPublic: true },
|
||||
localRoom: this.room ? { ...this.room } : { title: '', isPublic: true, isAdultOnly: false },
|
||||
roomTypes: [],
|
||||
genderRestrictions: [],
|
||||
userRights: [],
|
||||
@@ -102,7 +106,7 @@ export default {
|
||||
watch: {
|
||||
room: {
|
||||
handler(newVal) {
|
||||
this.localRoom = newVal ? { ...newVal } : { title: '', isPublic: true };
|
||||
this.localRoom = newVal ? { ...newVal } : { title: '', isPublic: true, isAdultOnly: false };
|
||||
this.showGenderRestriction = !!(newVal && newVal.genderRestrictionId);
|
||||
this.showMinAge = !!(newVal && newVal.minAge);
|
||||
this.showMaxAge = !!(newVal && newVal.maxAge);
|
||||
@@ -137,7 +141,7 @@ export default {
|
||||
this.fetchGenderRestrictions(),
|
||||
this.fetchUserRights()
|
||||
]);
|
||||
this.localRoom = roomData ? { ...roomData } : { title: '', isPublic: true };
|
||||
this.localRoom = roomData ? { ...roomData } : { title: '', isPublic: true, isAdultOnly: false };
|
||||
this.dialog.open();
|
||||
},
|
||||
closeDialog() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<DialogWidget ref="dialog" :title="$t('chat.multichat.title')" :modal="false" :show-close="true"
|
||||
<DialogWidget ref="dialog" :title="dialogTitle" :modal="false" :show-close="true"
|
||||
@close="onDialogClose" width="75vw" height="75vh" name="MultiChatDialog" icon="multichat24.png">
|
||||
<div class="dialog-widget-content">
|
||||
<div class="multi-chat-top">
|
||||
@@ -7,7 +7,7 @@
|
||||
<select v-model="selectedRoom" class="room-select">
|
||||
<option v-for="room in rooms" :key="room.id" :value="room.id">{{ room.title }}</option>
|
||||
</select>
|
||||
<button class="create-room-toggle-btn" type="button" @click="toggleRoomCreatePanel">
|
||||
<button v-if="!adultOnlyMode" class="create-room-toggle-btn" type="button" @click="toggleRoomCreatePanel">
|
||||
{{ showRoomCreatePanel ? $t('chat.multichat.createRoom.toggleShowChat') : $t('chat.multichat.createRoom.toggleCreateRoom') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -246,6 +246,9 @@ export default {
|
||||
components: { DialogWidget },
|
||||
computed: {
|
||||
...mapGetters(['user', 'menu']),
|
||||
dialogTitle() {
|
||||
return this.adultOnlyMode ? this.$t('chat.multichat.eroticTitle') : this.$t('chat.multichat.title');
|
||||
},
|
||||
isAdmin() {
|
||||
// Infer admin via presence of administration section in menu (server filters by rights)
|
||||
try {
|
||||
@@ -318,6 +321,7 @@ export default {
|
||||
announcedRoomEnter: false,
|
||||
showColorPicker: false,
|
||||
showRoomCreatePanel: false,
|
||||
adultOnlyMode: false,
|
||||
selectedColor: '#000000',
|
||||
lastColor: '#000000',
|
||||
hexInput: '#000000',
|
||||
@@ -690,7 +694,8 @@ export default {
|
||||
return map[code] || 'unknown reason';
|
||||
},
|
||||
// Wird extern aufgerufen um den Dialog zu öffnen
|
||||
open(rooms) {
|
||||
open(rooms, options = {}) {
|
||||
this.adultOnlyMode = Boolean(options?.adultOnly);
|
||||
// Falls externe Räume übergeben wurden, nutzen; sonst vom Server laden
|
||||
if (Array.isArray(rooms) && rooms.length) {
|
||||
this.initializeRooms(rooms);
|
||||
@@ -729,7 +734,7 @@ export default {
|
||||
},
|
||||
async loadRooms() {
|
||||
try {
|
||||
const data = await fetchPublicRooms();
|
||||
const data = await fetchPublicRooms(this.adultOnlyMode ? { adultOnly: true } : {});
|
||||
this.initializeRooms(Array.isArray(data) ? data : []);
|
||||
} catch (e) {
|
||||
console.error('Fehler beim Laden der Räume', e);
|
||||
|
||||
@@ -53,9 +53,11 @@ export default {
|
||||
return {
|
||||
folderTitle: '',
|
||||
visibilityOptions: [],
|
||||
allVisibilityOptions: [],
|
||||
selectedVisibility: [],
|
||||
parentFolder: {id: null, name: ''},
|
||||
folderId: 0
|
||||
folderId: 0,
|
||||
eroticMode: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -69,6 +71,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open(folder = null) {
|
||||
this.visibilityOptions = this.eroticMode
|
||||
? this.allVisibilityOptions.filter(option => option.description !== 'everyone')
|
||||
: [...this.allVisibilityOptions];
|
||||
if (folder) {
|
||||
this.folderTitle = folder.name;
|
||||
this.selectedVisibility = this.visibilityOptions.filter(option =>
|
||||
@@ -83,7 +88,10 @@ export default {
|
||||
async loadVisibilityOptions() {
|
||||
try {
|
||||
const response = await apiClient.get('/api/socialnetwork/imagevisibilities');
|
||||
this.visibilityOptions = response.data;
|
||||
this.allVisibilityOptions = response.data;
|
||||
this.visibilityOptions = this.eroticMode
|
||||
? response.data.filter(option => option.description !== 'everyone')
|
||||
: [...response.data];
|
||||
if (this.selectedVisibility.length) {
|
||||
this.selectedVisibility = this.visibilityOptions.filter(option =>
|
||||
this.selectedVisibility.map(v => v.id).includes(option.id)
|
||||
@@ -103,10 +111,11 @@ export default {
|
||||
visibilities: this.selectedVisibility.map(item => item.id),
|
||||
};
|
||||
try {
|
||||
const basePath = this.eroticMode ? '/api/socialnetwork/erotic/folders' : '/api/socialnetwork/folders';
|
||||
if (this.parentFolder.id) {
|
||||
await apiClient.post(`/api/socialnetwork/folders/${this.parentFolder.id}`, payload);
|
||||
await apiClient.post(`${basePath}/${this.parentFolder.id}`, payload);
|
||||
} else {
|
||||
await apiClient.post(`/api/socialnetwork/folders/${this.folderId}`, payload);
|
||||
await apiClient.post(`${basePath}/${this.folderId}`, payload);
|
||||
}
|
||||
EventBus.emit('folderCreated');
|
||||
this.closeDialog();
|
||||
|
||||
Reference in New Issue
Block a user