]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/moderation.routes.ts
Implement signup approval in client
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
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 { UserRightGuard } from '@app/core'
6 import { UserRight } from '@shared/models'
7 import { RegistrationListComponent } from './registration-list'
8
9 export const ModerationRoutes: Routes = [
10 {
11 path: 'moderation',
12 children: [
13 {
14 path: '',
15 redirectTo: 'abuses/list',
16 pathMatch: 'full'
17 },
18 {
19 path: 'video-abuses',
20 redirectTo: 'abuses/list',
21 pathMatch: 'full'
22 },
23 {
24 path: 'video-abuses/list',
25 redirectTo: 'abuses/list',
26 pathMatch: 'full'
27 },
28 {
29 path: 'abuses/list',
30 component: AbuseListComponent,
31 canActivate: [ UserRightGuard ],
32 data: {
33 userRight: UserRight.MANAGE_ABUSES,
34 meta: {
35 title: $localize`Reports`
36 }
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: $localize`Blocked videos`
68 }
69 }
70 },
71
72 {
73 path: 'registrations/list',
74 component: RegistrationListComponent,
75 canActivate: [ UserRightGuard ],
76 data: {
77 userRight: UserRight.MANAGE_REGISTRATIONS,
78 meta: {
79 title: $localize`User registrations`
80 }
81 }
82 },
83
84 // We moved this component in admin overview pages
85 {
86 path: 'video-comments',
87 redirectTo: 'video-comments/list',
88 pathMatch: 'full'
89 },
90 {
91 path: 'video-comments/list',
92 redirectTo: '/admin/comments/list',
93 pathMatch: 'full'
94 },
95
96 {
97 path: 'blocklist/accounts',
98 component: InstanceAccountBlocklistComponent,
99 canActivate: [ UserRightGuard ],
100 data: {
101 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
102 meta: {
103 title: $localize`Muted accounts`
104 }
105 }
106 },
107 {
108 path: 'blocklist/servers',
109 component: InstanceServerBlocklistComponent,
110 canActivate: [ UserRightGuard ],
111 data: {
112 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
113 meta: {
114 title: $localize`Muted instances`
115 }
116 }
117 }
118 ]
119 }
120 ]