]>
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' | |
614d1ae9 C |
7 | |
8 | export const ModerationRoutes: Routes = [ | |
9 | { | |
10 | path: 'moderation', | |
614d1ae9 C |
11 | children: [ |
12 | { | |
13 | path: '', | |
d95d1559 | 14 | redirectTo: 'abuses/list', |
614d1ae9 C |
15 | pathMatch: 'full' |
16 | }, | |
ad76628b C |
17 | { |
18 | path: 'video-abuses', | |
d95d1559 | 19 | redirectTo: 'abuses/list', |
ad76628b C |
20 | pathMatch: 'full' |
21 | }, | |
614d1ae9 C |
22 | { |
23 | path: 'video-abuses/list', | |
d95d1559 C |
24 | redirectTo: 'abuses/list', |
25 | pathMatch: 'full' | |
26 | }, | |
27 | { | |
28 | path: 'abuses/list', | |
29 | component: AbuseListComponent, | |
614d1ae9 C |
30 | canActivate: [ UserRightGuard ], |
31 | data: { | |
d95d1559 | 32 | userRight: UserRight.MANAGE_ABUSES, |
614d1ae9 | 33 | meta: { |
f29f487e | 34 | title: $localize`Reports` |
614d1ae9 C |
35 | } |
36 | } | |
37 | }, | |
0f8d00e3 | 38 | |
5baee5fc RK |
39 | { |
40 | path: 'video-blacklist', | |
41 | redirectTo: 'video-blocks/list', | |
42 | pathMatch: 'full' | |
43 | }, | |
44 | { | |
45 | path: 'video-auto-blacklist', | |
46 | redirectTo: 'video-blocks/list', | |
47 | pathMatch: 'full' | |
48 | }, | |
7ccddd7b JM |
49 | { |
50 | path: 'video-auto-blacklist/list', | |
5baee5fc RK |
51 | redirectTo: 'video-blocks/list', |
52 | pathMatch: 'full' | |
53 | }, | |
54 | { | |
55 | path: 'video-blacklist', | |
56 | redirectTo: 'video-blocks/list', | |
57 | pathMatch: 'full' | |
7ccddd7b | 58 | }, |
614d1ae9 | 59 | { |
5baee5fc RK |
60 | path: 'video-blocks/list', |
61 | component: VideoBlockListComponent, | |
614d1ae9 C |
62 | canActivate: [ UserRightGuard ], |
63 | data: { | |
3487330d | 64 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, |
614d1ae9 | 65 | meta: { |
0f8d00e3 | 66 | title: $localize`Blocked videos` |
614d1ae9 C |
67 | } |
68 | } | |
65b21c96 | 69 | }, |
0f8d00e3 | 70 | |
5a51ecc2 | 71 | // We move this component in admin overview pages |
0f8d00e3 C |
72 | { |
73 | path: 'video-comments', | |
74 | redirectTo: 'video-comments/list', | |
75 | pathMatch: 'full' | |
76 | }, | |
77 | { | |
78 | path: 'video-comments/list', | |
5a51ecc2 C |
79 | redirectTo: '/admin/comments/list', |
80 | pathMatch: 'full' | |
0f8d00e3 C |
81 | }, |
82 | ||
65b21c96 C |
83 | { |
84 | path: 'blocklist/accounts', | |
85 | component: InstanceAccountBlocklistComponent, | |
86 | canActivate: [ UserRightGuard ], | |
87 | data: { | |
88 | userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST, | |
89 | meta: { | |
f29f487e | 90 | title: $localize`Muted accounts` |
65b21c96 C |
91 | } |
92 | } | |
93 | }, | |
94 | { | |
95 | path: 'blocklist/servers', | |
96 | component: InstanceServerBlocklistComponent, | |
97 | canActivate: [ UserRightGuard ], | |
98 | data: { | |
72be63e5 | 99 | userRight: UserRight.MANAGE_SERVERS_BLOCKLIST, |
65b21c96 | 100 | meta: { |
f29f487e | 101 | title: $localize`Muted instances` |
65b21c96 C |
102 | } |
103 | } | |
614d1ae9 C |
104 | } |
105 | ] | |
106 | } | |
107 | ] |