]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/+admin/moderation/moderation.routes.ts
Move admin comments list in overviews menu
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
... / ...
CommitLineData
1import { Routes } from '@angular/router'
2import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
4import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
5import { UserRightGuard } from '@app/core'
6import { UserRight } from '@shared/models'
7
8export const ModerationRoutes: Routes = [
9 {
10 path: 'moderation',
11 children: [
12 {
13 path: '',
14 redirectTo: 'abuses/list',
15 pathMatch: 'full'
16 },
17 {
18 path: 'video-abuses',
19 redirectTo: 'abuses/list',
20 pathMatch: 'full'
21 },
22 {
23 path: 'video-abuses/list',
24 redirectTo: 'abuses/list',
25 pathMatch: 'full'
26 },
27 {
28 path: 'abuses/list',
29 component: AbuseListComponent,
30 canActivate: [ UserRightGuard ],
31 data: {
32 userRight: UserRight.MANAGE_ABUSES,
33 meta: {
34 title: $localize`Reports`
35 }
36 }
37 },
38
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 },
49 {
50 path: 'video-auto-blacklist/list',
51 redirectTo: 'video-blocks/list',
52 pathMatch: 'full'
53 },
54 {
55 path: 'video-blacklist',
56 redirectTo: 'video-blocks/list',
57 pathMatch: 'full'
58 },
59 {
60 path: 'video-blocks/list',
61 component: VideoBlockListComponent,
62 canActivate: [ UserRightGuard ],
63 data: {
64 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
65 meta: {
66 title: $localize`Blocked videos`
67 }
68 }
69 },
70
71 // We move this component in admin overview pages
72 {
73 path: 'video-comments',
74 redirectTo: 'video-comments/list',
75 pathMatch: 'full'
76 },
77 {
78 path: 'video-comments/list',
79 redirectTo: '/admin/comments/list',
80 pathMatch: 'full'
81 },
82
83 {
84 path: 'blocklist/accounts',
85 component: InstanceAccountBlocklistComponent,
86 canActivate: [ UserRightGuard ],
87 data: {
88 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
89 meta: {
90 title: $localize`Muted accounts`
91 }
92 }
93 },
94 {
95 path: 'blocklist/servers',
96 component: InstanceServerBlocklistComponent,
97 canActivate: [ UserRightGuard ],
98 data: {
99 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
100 meta: {
101 title: $localize`Muted instances`
102 }
103 }
104 }
105 ]
106 }
107]