]>
Commit | Line | Data |
---|---|---|
614d1ae9 | 1 | import { Routes } from '@angular/router' |
0f8d00e3 | 2 | import { AbuseListComponent } from '@app/+admin/moderation/abuse-list' |
67ed6552 | 3 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' |
5baee5fc | 4 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' |
67ed6552 C |
5 | import { UserRightGuard } from '@app/core' |
6 | import { UserRight } from '@shared/models' | |
9589907c | 7 | import { RegistrationListComponent } from './registration-list' |
614d1ae9 C |
8 | |
9 | export 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 | 71 | |
9589907c C |
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 | |
0f8d00e3 C |
85 | { |
86 | path: 'video-comments', | |
87 | redirectTo: 'video-comments/list', | |
88 | pathMatch: 'full' | |
89 | }, | |
90 | { | |
91 | path: 'video-comments/list', | |
5a51ecc2 C |
92 | redirectTo: '/admin/comments/list', |
93 | pathMatch: 'full' | |
0f8d00e3 C |
94 | }, |
95 | ||
65b21c96 C |
96 | { |
97 | path: 'blocklist/accounts', | |
98 | component: InstanceAccountBlocklistComponent, | |
99 | canActivate: [ UserRightGuard ], | |
100 | data: { | |
101 | userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST, | |
102 | meta: { | |
f29f487e | 103 | title: $localize`Muted accounts` |
65b21c96 C |
104 | } |
105 | } | |
106 | }, | |
107 | { | |
108 | path: 'blocklist/servers', | |
109 | component: InstanceServerBlocklistComponent, | |
110 | canActivate: [ UserRightGuard ], | |
111 | data: { | |
72be63e5 | 112 | userRight: UserRight.MANAGE_SERVERS_BLOCKLIST, |
65b21c96 | 113 | meta: { |
f29f487e | 114 | title: $localize`Muted instances` |
65b21c96 C |
115 | } |
116 | } | |
614d1ae9 C |
117 | } |
118 | ] | |
119 | } | |
120 | ] |