feat(socialnetwork): enhance folder and video management with user visibility options

- Added functionality to manage selected users for adult folders and erotic videos, allowing for more granular visibility control.
- Introduced new endpoints and methods in the SocialNetworkController and SocialNetworkService to handle selected users.
- Updated the frontend components to include input fields for selected users in CreateFolderDialog, EditImageDialog, and EroticPicturesView.
- Enhanced the routing to support fetching erotic folders and videos by username, improving user experience in profile views.
This commit is contained in:
Torsten Schulz (local)
2026-03-27 16:56:45 +01:00
parent 3b29273f90
commit 5556beffef
13 changed files with 1081 additions and 36 deletions

View File

@@ -30,6 +30,15 @@
</template>
</multiselect>
</div>
<div v-if="requiresSelectedUsers" class="form-group">
<label for="selectedUsers">{{ $t("socialnetwork.gallery.visibility.selected-users") }}</label>
<input
id="selectedUsers"
type="text"
v-model="selectedUsernamesText"
placeholder="anna, bert, clara"
/>
</div>
</div>
</DialogWidget>
</template>
@@ -55,6 +64,7 @@ export default {
visibilityOptions: [],
allVisibilityOptions: [],
selectedVisibility: [],
selectedUsernamesText: '',
parentFolder: {id: null, name: ''},
folderId: 0,
eroticMode: false
@@ -65,6 +75,9 @@ export default {
buttons() {
return [{ text: this.$t("socialnetwork.gallery.create_folder"), action: this.createFolder }];
},
requiresSelectedUsers() {
return this.selectedVisibility.some(option => option?.description === 'selected-users');
}
},
async mounted() {
await this.loadVisibilityOptions();
@@ -79,9 +92,11 @@ export default {
this.selectedVisibility = this.visibilityOptions.filter(option =>
folder.visibilityTypeIds.includes(option.id)
);
this.selectedUsernamesText = (folder.selectedUsers || []).join(', ');
} else {
this.folderTitle = '';
this.selectedVisibility = [];
this.selectedUsernamesText = '';
}
this.$refs.dialog.open();
},
@@ -109,6 +124,10 @@ export default {
name: this.folderTitle,
parentId: this.parentFolder.id,
visibilities: this.selectedVisibility.map(item => item.id),
selectedUsers: this.selectedUsernamesText
.split(',')
.map(value => value.trim())
.filter(Boolean),
};
try {
const basePath = this.eroticMode ? '/api/socialnetwork/erotic/folders' : '/api/socialnetwork/folders';