]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/moderation.routes.ts
Remove useless async
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
CommitLineData
614d1ae9 1import { Routes } from '@angular/router'
0f8d00e3 2import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
67ed6552
C
3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
4import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
5baee5fc 5import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
0f8d00e3 6import { VideoCommentListComponent } from './video-comment-list'
67ed6552
C
7import { UserRightGuard } from '@app/core'
8import { UserRight } from '@shared/models'
614d1ae9
C
9
10export const ModerationRoutes: Routes = [
11 {
12 path: 'moderation',
13 component: ModerationComponent,
14 children: [
15 {
16 path: '',
d95d1559 17 redirectTo: 'abuses/list',
614d1ae9
C
18 pathMatch: 'full'
19 },
ad76628b
C
20 {
21 path: 'video-abuses',
d95d1559 22 redirectTo: 'abuses/list',
ad76628b
C
23 pathMatch: 'full'
24 },
614d1ae9
C
25 {
26 path: 'video-abuses/list',
d95d1559
C
27 redirectTo: 'abuses/list',
28 pathMatch: 'full'
29 },
30 {
31 path: 'abuses/list',
32 component: AbuseListComponent,
614d1ae9
C
33 canActivate: [ UserRightGuard ],
34 data: {
d95d1559 35 userRight: UserRight.MANAGE_ABUSES,
614d1ae9 36 meta: {
f29f487e 37 title: $localize`Reports`
614d1ae9
C
38 }
39 }
40 },
0f8d00e3 41
5baee5fc
RK
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 },
7ccddd7b
JM
52 {
53 path: 'video-auto-blacklist/list',
5baee5fc
RK
54 redirectTo: 'video-blocks/list',
55 pathMatch: 'full'
56 },
57 {
58 path: 'video-blacklist',
59 redirectTo: 'video-blocks/list',
60 pathMatch: 'full'
7ccddd7b 61 },
614d1ae9 62 {
5baee5fc
RK
63 path: 'video-blocks/list',
64 component: VideoBlockListComponent,
614d1ae9
C
65 canActivate: [ UserRightGuard ],
66 data: {
3487330d 67 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
614d1ae9 68 meta: {
0f8d00e3 69 title: $localize`Blocked videos`
614d1ae9
C
70 }
71 }
65b21c96 72 },
0f8d00e3
C
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
65b21c96
C
91 {
92 path: 'blocklist/accounts',
93 component: InstanceAccountBlocklistComponent,
94 canActivate: [ UserRightGuard ],
95 data: {
96 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
97 meta: {
f29f487e 98 title: $localize`Muted accounts`
65b21c96
C
99 }
100 }
101 },
102 {
103 path: 'blocklist/servers',
104 component: InstanceServerBlocklistComponent,
105 canActivate: [ UserRightGuard ],
106 data: {
72be63e5 107 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
65b21c96 108 meta: {
f29f487e 109 title: $localize`Muted instances`
65b21c96
C
110 }
111 }
614d1ae9
C
112 }
113 ]
114 }
115]