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