Move admin comments list in overviews menu
This commit is contained in:
parent
f1c70a8666
commit
5a51ecc217
|
@ -52,6 +52,14 @@ export class AdminComponent implements OnInit {
|
|||
})
|
||||
}
|
||||
|
||||
if (this.hasVideoCommentsRight()) {
|
||||
overviewItems.children.push({
|
||||
label: $localize`Comments`,
|
||||
routerLink: '/admin/comments',
|
||||
iconName: 'message-circle'
|
||||
})
|
||||
}
|
||||
|
||||
if (overviewItems.children.length !== 0) {
|
||||
this.menuEntries.push(overviewItems)
|
||||
}
|
||||
|
@ -104,14 +112,6 @@ export class AdminComponent implements OnInit {
|
|||
})
|
||||
}
|
||||
|
||||
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`,
|
||||
|
|
|
@ -32,13 +32,13 @@ import { RedundancyCheckboxComponent } from './follows/shared/redundancy-checkbo
|
|||
import { VideoRedundancyInformationComponent } from './follows/video-redundancies-list/video-redundancy-information.component'
|
||||
import { AbuseListComponent, VideoBlockListComponent } from './moderation'
|
||||
import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist'
|
||||
import { VideoCommentListComponent } from './moderation/video-comment-list'
|
||||
import {
|
||||
UserCreateComponent,
|
||||
UserListComponent,
|
||||
UserPasswordComponent,
|
||||
UserUpdateComponent,
|
||||
VideoAdminService,
|
||||
VideoCommentListComponent,
|
||||
VideoListComponent
|
||||
} from './overview'
|
||||
import {
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Routes } from '@angular/router'
|
|||
import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
|
||||
import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
|
||||
import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
|
||||
import { VideoCommentListComponent } from './video-comment-list'
|
||||
import { UserRightGuard } from '@app/core'
|
||||
import { UserRight } from '@shared/models'
|
||||
|
||||
|
@ -69,6 +68,7 @@ export const ModerationRoutes: Routes = [
|
|||
}
|
||||
},
|
||||
|
||||
// We move this component in admin overview pages
|
||||
{
|
||||
path: 'video-comments',
|
||||
redirectTo: 'video-comments/list',
|
||||
|
@ -76,14 +76,8 @@ export const ModerationRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'video-comments/list',
|
||||
component: VideoCommentListComponent,
|
||||
canActivate: [ UserRightGuard ],
|
||||
data: {
|
||||
userRight: UserRight.SEE_ALL_COMMENTS,
|
||||
meta: {
|
||||
title: $localize`Video comments`
|
||||
}
|
||||
}
|
||||
redirectTo: '/admin/comments/list',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
|
||||
{
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
export * from './video-comment-list.component'
|
||||
export * from './video-comment.routes'
|
|
@ -0,0 +1,30 @@
|
|||
import { Routes } from '@angular/router'
|
||||
import { UserRightGuard } from '@app/core'
|
||||
import { UserRight } from '@shared/models'
|
||||
import { VideoCommentListComponent } from './video-comment-list.component'
|
||||
|
||||
export const commentRoutes: Routes = [
|
||||
{
|
||||
path: 'comments',
|
||||
canActivate: [ UserRightGuard ],
|
||||
data: {
|
||||
userRight: UserRight.SEE_ALL_COMMENTS
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'list',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
component: VideoCommentListComponent,
|
||||
data: {
|
||||
meta: {
|
||||
title: $localize`Comments list`
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -1,3 +1,4 @@
|
|||
export * from './comments'
|
||||
export * from './users'
|
||||
export * from './videos'
|
||||
export * from './overview.routes'
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { Routes } from '@angular/router'
|
||||
import { UsersRoutes } from './users'
|
||||
import { VideosRoutes } from './videos'
|
||||
import { commentRoutes } from './comments'
|
||||
import { usersRoutes } from './users'
|
||||
import { videosRoutes } from './videos'
|
||||
|
||||
export const OverviewRoutes: Routes = [
|
||||
...UsersRoutes,
|
||||
...VideosRoutes
|
||||
...commentRoutes,
|
||||
...usersRoutes,
|
||||
...videosRoutes
|
||||
]
|
||||
|
|
|
@ -4,7 +4,7 @@ import { UserRight } from '@shared/models'
|
|||
import { UserCreateComponent, UserUpdateComponent } from './user-edit'
|
||||
import { UserListComponent } from './user-list'
|
||||
|
||||
export const UsersRoutes: Routes = [
|
||||
export const usersRoutes: Routes = [
|
||||
{
|
||||
path: 'users',
|
||||
canActivate: [ UserRightGuard ],
|
||||
|
|
|
@ -3,7 +3,7 @@ import { UserRightGuard } from '@app/core'
|
|||
import { UserRight } from '@shared/models'
|
||||
import { VideoListComponent } from './video-list.component'
|
||||
|
||||
export const VideosRoutes: Routes = [
|
||||
export const videosRoutes: Routes = [
|
||||
{
|
||||
path: 'videos',
|
||||
canActivate: [ UserRightGuard ],
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue