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 { ModerationComponent } from '@app/+admin/moderation/moderation.component'
5 import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
6 import { VideoCommentListComponent } from './video-comment-list'
7 import { UserRightGuard } from '@app/core'
8 import { UserRight } from '@shared/models'
10 export const ModerationRoutes: Routes = [
13 component: ModerationComponent,
17 redirectTo: 'abuses/list',
22 redirectTo: 'abuses/list',
26 path: 'video-abuses/list',
27 redirectTo: 'abuses/list',
32 component: AbuseListComponent,
33 canActivate: [ UserRightGuard ],
35 userRight: UserRight.MANAGE_ABUSES,
37 title: $localize`Reports`
43 path: 'video-blacklist',
44 redirectTo: 'video-blocks/list',
48 path: 'video-auto-blacklist',
49 redirectTo: 'video-blocks/list',
53 path: 'video-auto-blacklist/list',
54 redirectTo: 'video-blocks/list',
58 path: 'video-blacklist',
59 redirectTo: 'video-blocks/list',
63 path: 'video-blocks/list',
64 component: VideoBlockListComponent,
65 canActivate: [ UserRightGuard ],
67 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
69 title: $localize`Blocked videos`
75 path: 'video-comments',
76 redirectTo: 'video-comments/list',
80 path: 'video-comments/list',
81 component: VideoCommentListComponent,
82 canActivate: [ UserRightGuard ],
84 userRight: UserRight.SEE_ALL_COMMENTS,
86 title: $localize`Video comments`
92 path: 'blocklist/accounts',
93 component: InstanceAccountBlocklistComponent,
94 canActivate: [ UserRightGuard ],
96 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
98 title: $localize`Muted accounts`
103 path: 'blocklist/servers',
104 component: InstanceServerBlocklistComponent,
105 canActivate: [ UserRightGuard ],
107 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
109 title: $localize`Muted instances`