1 import { Routes } from '@angular/router'
2 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
3 import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
4 import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
5 import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
6 import { UserRightGuard } from '@app/core'
7 import { UserRight } from '@shared/models'
9 export const ModerationRoutes: Routes = [
12 component: ModerationComponent,
16 redirectTo: 'abuses/list',
21 redirectTo: 'abuses/list',
25 path: 'video-abuses/list',
26 redirectTo: 'abuses/list',
31 component: AbuseListComponent,
32 canActivate: [ UserRightGuard ],
34 userRight: UserRight.MANAGE_ABUSES,
36 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`Videos blocked`
72 path: 'blocklist/accounts',
73 component: InstanceAccountBlocklistComponent,
74 canActivate: [ UserRightGuard ],
76 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
78 title: $localize`Muted accounts`
83 path: 'blocklist/servers',
84 component: InstanceServerBlocklistComponent,
85 canActivate: [ UserRightGuard ],
87 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
89 title: $localize`Muted instances`