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 { VideoCommentListComponent } from './video-comment-list'
6 import { UserRightGuard } from '@app/core'
7 import { UserRight } from '@shared/models'
9 export const ModerationRoutes: Routes = [
15 redirectTo: 'abuses/list',
20 redirectTo: 'abuses/list',
24 path: 'video-abuses/list',
25 redirectTo: 'abuses/list',
30 component: AbuseListComponent,
31 canActivate: [ UserRightGuard ],
33 userRight: UserRight.MANAGE_ABUSES,
35 title: $localize`Reports`
41 path: 'video-blacklist',
42 redirectTo: 'video-blocks/list',
46 path: 'video-auto-blacklist',
47 redirectTo: 'video-blocks/list',
51 path: 'video-auto-blacklist/list',
52 redirectTo: 'video-blocks/list',
56 path: 'video-blacklist',
57 redirectTo: 'video-blocks/list',
61 path: 'video-blocks/list',
62 component: VideoBlockListComponent,
63 canActivate: [ UserRightGuard ],
65 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
67 title: $localize`Blocked videos`
73 path: 'video-comments',
74 redirectTo: 'video-comments/list',
78 path: 'video-comments/list',
79 component: VideoCommentListComponent,
80 canActivate: [ UserRightGuard ],
82 userRight: UserRight.SEE_ALL_COMMENTS,
84 title: $localize`Video comments`
90 path: 'blocklist/accounts',
91 component: InstanceAccountBlocklistComponent,
92 canActivate: [ UserRightGuard ],
94 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
96 title: $localize`Muted accounts`
101 path: 'blocklist/servers',
102 component: InstanceServerBlocklistComponent,
103 canActivate: [ UserRightGuard ],
105 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
107 title: $localize`Muted instances`