}
private buildOverviewItems () {
+ const overviewItems: TopMenuDropdownParam = {
+ label: $localize`Overview`,
+ children: []
+ }
+
if (this.hasUsersRight()) {
- this.menuEntries.push({ label: $localize`Users`, routerLink: '/admin/users' })
+ overviewItems.children.push({
+ label: $localize`Users`,
+ routerLink: '/admin/users',
+ iconName: 'user'
+ })
+ }
+
+ if (this.hasVideosRight()) {
+ overviewItems.children.push({
+ label: $localize`Videos`,
+ routerLink: '/admin/videos',
+ iconName: 'videos'
+ })
+ }
+
+ if (this.hasVideoCommentsRight()) {
+ overviewItems.children.push({
+ label: $localize`Comments`,
+ routerLink: '/admin/comments',
+ iconName: 'message-circle'
+ })
+ }
+
+ if (overviewItems.children.length !== 0) {
+ this.menuEntries.push(overviewItems)
}
}
})
}
- if (this.hasVideoCommentsRight()) {
- moderationItems.children.push({
- label: $localize`Video comments`,
- routerLink: '/admin/moderation/video-comments/list',
- iconName: 'message-circle'
- })
- }
-
if (this.hasAccountsBlocklistRight()) {
moderationItems.children.push({
label: $localize`Muted accounts`,
private hasVideoCommentsRight () {
return this.auth.getUser().hasRight(UserRight.SEE_ALL_COMMENTS)
}
+
+ private hasVideosRight () {
+ return this.auth.getUser().hasRight(UserRight.SEE_ALL_VIDEOS)
+ }
}