1 import { Routes } from '@angular/router'
2 import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
3 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
4 import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
5 import { UserRightGuard } from '@app/core'
6 import { UserRight } from '@shared/models'
8 export const ModerationRoutes: Routes = [
14 redirectTo: 'abuses/list',
19 redirectTo: 'abuses/list',
23 path: 'video-abuses/list',
24 redirectTo: 'abuses/list',
29 component: AbuseListComponent,
30 canActivate: [ UserRightGuard ],
32 userRight: UserRight.MANAGE_ABUSES,
34 title: $localize`Reports`
40 path: 'video-blacklist',
41 redirectTo: 'video-blocks/list',
45 path: 'video-auto-blacklist',
46 redirectTo: 'video-blocks/list',
50 path: 'video-auto-blacklist/list',
51 redirectTo: 'video-blocks/list',
55 path: 'video-blacklist',
56 redirectTo: 'video-blocks/list',
60 path: 'video-blocks/list',
61 component: VideoBlockListComponent,
62 canActivate: [ UserRightGuard ],
64 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
66 title: $localize`Blocked videos`
71 // We move this component in admin overview pages
73 path: 'video-comments',
74 redirectTo: 'video-comments/list',
78 path: 'video-comments/list',
79 redirectTo: '/admin/comments/list',
84 path: 'blocklist/accounts',
85 component: InstanceAccountBlocklistComponent,
86 canActivate: [ UserRightGuard ],
88 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
90 title: $localize`Muted accounts`
95 path: 'blocklist/servers',
96 component: InstanceServerBlocklistComponent,
97 canActivate: [ UserRightGuard ],
99 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
101 title: $localize`Muted instances`