]>
Commit | Line | Data |
---|---|---|
614d1ae9 | 1 | import { Routes } from '@angular/router' |
67ed6552 C |
2 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' |
3 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' | |
d95d1559 | 4 | import { AbuseListComponent } from '@app/+admin/moderation/abuse-list' |
5baee5fc | 5 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' |
67ed6552 C |
6 | import { UserRightGuard } from '@app/core' |
7 | import { UserRight } from '@shared/models' | |
614d1ae9 C |
8 | |
9 | export const ModerationRoutes: Routes = [ | |
10 | { | |
11 | path: 'moderation', | |
12 | component: ModerationComponent, | |
13 | children: [ | |
14 | { | |
15 | path: '', | |
d95d1559 | 16 | redirectTo: 'abuses/list', |
614d1ae9 C |
17 | pathMatch: 'full' |
18 | }, | |
ad76628b C |
19 | { |
20 | path: 'video-abuses', | |
d95d1559 | 21 | redirectTo: 'abuses/list', |
ad76628b C |
22 | pathMatch: 'full' |
23 | }, | |
614d1ae9 C |
24 | { |
25 | path: 'video-abuses/list', | |
d95d1559 C |
26 | redirectTo: 'abuses/list', |
27 | pathMatch: 'full' | |
28 | }, | |
29 | { | |
30 | path: 'abuses/list', | |
31 | component: AbuseListComponent, | |
614d1ae9 C |
32 | canActivate: [ UserRightGuard ], |
33 | data: { | |
d95d1559 | 34 | userRight: UserRight.MANAGE_ABUSES, |
614d1ae9 | 35 | meta: { |
8ca56654 | 36 | title: 'Reports' |
614d1ae9 C |
37 | } |
38 | } | |
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: { |
5baee5fc | 67 | title: 'Videos blocked' |
614d1ae9 C |
68 | } |
69 | } | |
65b21c96 C |
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: { | |
72be63e5 | 87 | userRight: UserRight.MANAGE_SERVERS_BLOCKLIST, |
65b21c96 C |
88 | meta: { |
89 | title: 'Muted instances' | |
90 | } | |
91 | } | |
614d1ae9 C |
92 | } |
93 | ] | |
94 | } | |
95 | ] |