]>
Commit | Line | Data |
---|---|---|
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 { ModerationComponent } from '@app/+admin/moderation/moderation.component' | |
5 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' | |
6 | import { VideoCommentListComponent } from './video-comment-list' | |
7 | import { UserRightGuard } from '@app/core' | |
8 | import { UserRight } from '@shared/models' | |
9 | ||
10 | export const ModerationRoutes: Routes = [ | |
11 | { | |
12 | path: 'moderation', | |
13 | component: ModerationComponent, | |
14 | children: [ | |
15 | { | |
16 | path: '', | |
17 | redirectTo: 'abuses/list', | |
18 | pathMatch: 'full' | |
19 | }, | |
20 | { | |
21 | path: 'video-abuses', | |
22 | redirectTo: 'abuses/list', | |
23 | pathMatch: 'full' | |
24 | }, | |
25 | { | |
26 | path: 'video-abuses/list', | |
27 | redirectTo: 'abuses/list', | |
28 | pathMatch: 'full' | |
29 | }, | |
30 | { | |
31 | path: 'abuses/list', | |
32 | component: AbuseListComponent, | |
33 | canActivate: [ UserRightGuard ], | |
34 | data: { | |
35 | userRight: UserRight.MANAGE_ABUSES, | |
36 | meta: { | |
37 | title: $localize`Reports` | |
38 | } | |
39 | } | |
40 | }, | |
41 | ||
42 | { | |
43 | path: 'video-blacklist', | |
44 | redirectTo: 'video-blocks/list', | |
45 | pathMatch: 'full' | |
46 | }, | |
47 | { | |
48 | path: 'video-auto-blacklist', | |
49 | redirectTo: 'video-blocks/list', | |
50 | pathMatch: 'full' | |
51 | }, | |
52 | { | |
53 | path: 'video-auto-blacklist/list', | |
54 | redirectTo: 'video-blocks/list', | |
55 | pathMatch: 'full' | |
56 | }, | |
57 | { | |
58 | path: 'video-blacklist', | |
59 | redirectTo: 'video-blocks/list', | |
60 | pathMatch: 'full' | |
61 | }, | |
62 | { | |
63 | path: 'video-blocks/list', | |
64 | component: VideoBlockListComponent, | |
65 | canActivate: [ UserRightGuard ], | |
66 | data: { | |
67 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, | |
68 | meta: { | |
69 | title: $localize`Blocked videos` | |
70 | } | |
71 | } | |
72 | }, | |
73 | ||
74 | { | |
75 | path: 'video-comments', | |
76 | redirectTo: 'video-comments/list', | |
77 | pathMatch: 'full' | |
78 | }, | |
79 | { | |
80 | path: 'video-comments/list', | |
81 | component: VideoCommentListComponent, | |
82 | canActivate: [ UserRightGuard ], | |
83 | data: { | |
84 | userRight: UserRight.SEE_ALL_COMMENTS, | |
85 | meta: { | |
86 | title: $localize`Video comments` | |
87 | } | |
88 | } | |
89 | }, | |
90 | ||
91 | { | |
92 | path: 'blocklist/accounts', | |
93 | component: InstanceAccountBlocklistComponent, | |
94 | canActivate: [ UserRightGuard ], | |
95 | data: { | |
96 | userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST, | |
97 | meta: { | |
98 | title: $localize`Muted accounts` | |
99 | } | |
100 | } | |
101 | }, | |
102 | { | |
103 | path: 'blocklist/servers', | |
104 | component: InstanceServerBlocklistComponent, | |
105 | canActivate: [ UserRightGuard ], | |
106 | data: { | |
107 | userRight: UserRight.MANAGE_SERVERS_BLOCKLIST, | |
108 | meta: { | |
109 | title: $localize`Muted instances` | |
110 | } | |
111 | } | |
112 | } | |
113 | ] | |
114 | } | |
115 | ] |