]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/moderation.routes.ts
Remove useless components
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
CommitLineData
614d1ae9 1import { Routes } from '@angular/router'
0f8d00e3 2import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
67ed6552 3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
5baee5fc 4import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
0f8d00e3 5import { VideoCommentListComponent } from './video-comment-list'
67ed6552
C
6import { UserRightGuard } from '@app/core'
7import { UserRight } from '@shared/models'
614d1ae9
C
8
9export const ModerationRoutes: Routes = [
10 {
11 path: 'moderation',
614d1ae9
C
12 children: [
13 {
14 path: '',
d95d1559 15 redirectTo: 'abuses/list',
614d1ae9
C
16 pathMatch: 'full'
17 },
ad76628b
C
18 {
19 path: 'video-abuses',
d95d1559 20 redirectTo: 'abuses/list',
ad76628b
C
21 pathMatch: 'full'
22 },
614d1ae9
C
23 {
24 path: 'video-abuses/list',
d95d1559
C
25 redirectTo: 'abuses/list',
26 pathMatch: 'full'
27 },
28 {
29 path: 'abuses/list',
30 component: AbuseListComponent,
614d1ae9
C
31 canActivate: [ UserRightGuard ],
32 data: {
d95d1559 33 userRight: UserRight.MANAGE_ABUSES,
614d1ae9 34 meta: {
f29f487e 35 title: $localize`Reports`
614d1ae9
C
36 }
37 }
38 },
0f8d00e3 39
5baee5fc
RK
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 },
7ccddd7b
JM
50 {
51 path: 'video-auto-blacklist/list',
5baee5fc
RK
52 redirectTo: 'video-blocks/list',
53 pathMatch: 'full'
54 },
55 {
56 path: 'video-blacklist',
57 redirectTo: 'video-blocks/list',
58 pathMatch: 'full'
7ccddd7b 59 },
614d1ae9 60 {
5baee5fc
RK
61 path: 'video-blocks/list',
62 component: VideoBlockListComponent,
614d1ae9
C
63 canActivate: [ UserRightGuard ],
64 data: {
3487330d 65 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
614d1ae9 66 meta: {
0f8d00e3 67 title: $localize`Blocked videos`
614d1ae9
C
68 }
69 }
65b21c96 70 },
0f8d00e3
C
71
72 {
73 path: 'video-comments',
74 redirectTo: 'video-comments/list',
75 pathMatch: 'full'
76 },
77 {
78 path: 'video-comments/list',
79 component: VideoCommentListComponent,
80 canActivate: [ UserRightGuard ],
81 data: {
82 userRight: UserRight.SEE_ALL_COMMENTS,
83 meta: {
84 title: $localize`Video comments`
85 }
86 }
87 },
88
65b21c96
C
89 {
90 path: 'blocklist/accounts',
91 component: InstanceAccountBlocklistComponent,
92 canActivate: [ UserRightGuard ],
93 data: {
94 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
95 meta: {
f29f487e 96 title: $localize`Muted accounts`
65b21c96
C
97 }
98 }
99 },
100 {
101 path: 'blocklist/servers',
102 component: InstanceServerBlocklistComponent,
103 canActivate: [ UserRightGuard ],
104 data: {
72be63e5 105 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
65b21c96 106 meta: {
f29f487e 107 title: $localize`Muted instances`
65b21c96
C
108 }
109 }
614d1ae9
C
110 }
111 ]
112 }
113]