]>
Commit | Line | Data |
---|---|---|
614d1ae9 C |
1 | import { Routes } from '@angular/router' |
2 | import { UserRight } from '../../../../../shared' | |
3 | import { UserRightGuard } from '@app/core' | |
4 | import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list' | |
5 | import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list' | |
7ccddd7b | 6 | import { VideoAutoBlacklistListComponent } from '@app/+admin/moderation/video-auto-blacklist-list' |
614d1ae9 | 7 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' |
65b21c96 | 8 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' |
614d1ae9 C |
9 | |
10 | export const ModerationRoutes: Routes = [ | |
11 | { | |
12 | path: 'moderation', | |
13 | component: ModerationComponent, | |
14 | children: [ | |
15 | { | |
16 | path: '', | |
17 | redirectTo: 'video-abuses/list', | |
18 | pathMatch: 'full' | |
19 | }, | |
ad76628b C |
20 | { |
21 | path: 'video-abuses', | |
22 | redirectTo: 'video-abuses/list', | |
23 | pathMatch: 'full' | |
24 | }, | |
25 | { | |
26 | path: 'video-blacklist', | |
27 | redirectTo: 'video-blacklist/list', | |
28 | pathMatch: 'full' | |
29 | }, | |
7ccddd7b JM |
30 | { |
31 | path: 'video-auto-blacklist', | |
32 | redirectTo: 'video-auto-blacklist/list', | |
33 | pathMatch: 'full' | |
34 | }, | |
614d1ae9 C |
35 | { |
36 | path: 'video-abuses/list', | |
37 | component: VideoAbuseListComponent, | |
38 | canActivate: [ UserRightGuard ], | |
39 | data: { | |
40 | userRight: UserRight.MANAGE_VIDEO_ABUSES, | |
41 | meta: { | |
42 | title: 'Video abuses list' | |
43 | } | |
44 | } | |
45 | }, | |
7ccddd7b JM |
46 | { |
47 | path: 'video-auto-blacklist/list', | |
48 | component: VideoAutoBlacklistListComponent, | |
49 | canActivate: [ UserRightGuard ], | |
50 | data: { | |
51 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, | |
52 | meta: { | |
53 | title: 'Auto-blacklisted videos' | |
54 | } | |
55 | } | |
56 | }, | |
614d1ae9 C |
57 | { |
58 | path: 'video-blacklist/list', | |
59 | component: VideoBlacklistListComponent, | |
60 | canActivate: [ UserRightGuard ], | |
61 | data: { | |
62 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, | |
63 | meta: { | |
64 | title: 'Blacklisted videos' | |
65 | } | |
66 | } | |
65b21c96 C |
67 | }, |
68 | { | |
69 | path: 'blocklist/accounts', | |
70 | component: InstanceAccountBlocklistComponent, | |
71 | canActivate: [ UserRightGuard ], | |
72 | data: { | |
73 | userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST, | |
74 | meta: { | |
75 | title: 'Muted accounts' | |
76 | } | |
77 | } | |
78 | }, | |
79 | { | |
80 | path: 'blocklist/servers', | |
81 | component: InstanceServerBlocklistComponent, | |
82 | canActivate: [ UserRightGuard ], | |
83 | data: { | |
72be63e5 | 84 | userRight: UserRight.MANAGE_SERVERS_BLOCKLIST, |
65b21c96 C |
85 | meta: { |
86 | title: 'Muted instances' | |
87 | } | |
88 | } | |
614d1ae9 C |
89 | } |
90 | ] | |
91 | } | |
92 | ] |