]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/moderation.routes.ts
Use 3 tables to represent abuses
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
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'
8
9 export const ModerationRoutes: Routes = [
10 {
11 path: 'moderation',
12 component: ModerationComponent,
13 children: [
14 {
15 path: '',
16 redirectTo: 'abuses/list',
17 pathMatch: 'full'
18 },
19 {
20 path: 'video-abuses',
21 redirectTo: 'abuses/list',
22 pathMatch: 'full'
23 },
24 {
25 path: 'video-abuses/list',
26 redirectTo: 'abuses/list',
27 pathMatch: 'full'
28 },
29 {
30 path: 'abuses/list',
31 component: AbuseListComponent,
32 canActivate: [ UserRightGuard ],
33 data: {
34 userRight: UserRight.MANAGE_ABUSES,
35 meta: {
36 title: 'Video reports'
37 }
38 }
39 },
40 {
41 path: 'video-blacklist',
42 redirectTo: 'video-blocks/list',
43 pathMatch: 'full'
44 },
45 {
46 path: 'video-auto-blacklist',
47 redirectTo: 'video-blocks/list',
48 pathMatch: 'full'
49 },
50 {
51 path: 'video-auto-blacklist/list',
52 redirectTo: 'video-blocks/list',
53 pathMatch: 'full'
54 },
55 {
56 path: 'video-blacklist',
57 redirectTo: 'video-blocks/list',
58 pathMatch: 'full'
59 },
60 {
61 path: 'video-blocks/list',
62 component: VideoBlockListComponent,
63 canActivate: [ UserRightGuard ],
64 data: {
65 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
66 meta: {
67 title: 'Videos blocked'
68 }
69 }
70 },
71 {
72 path: 'blocklist/accounts',
73 component: InstanceAccountBlocklistComponent,
74 canActivate: [ UserRightGuard ],
75 data: {
76 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
77 meta: {
78 title: 'Muted accounts'
79 }
80 }
81 },
82 {
83 path: 'blocklist/servers',
84 component: InstanceServerBlocklistComponent,
85 canActivate: [ UserRightGuard ],
86 data: {
87 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
88 meta: {
89 title: 'Muted instances'
90 }
91 }
92 }
93 ]
94 }
95 ]