]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/moderation.routes.ts
Factorize video display in table for moderation components, apply it to blacklisted...
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
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'
6 import { VideoAutoBlacklistListComponent } from '@app/+admin/moderation/video-auto-blacklist-list'
7 import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
8 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
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 },
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 },
30 {
31 path: 'video-auto-blacklist',
32 redirectTo: 'video-auto-blacklist/list',
33 pathMatch: 'full'
34 },
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 },
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 },
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 }
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: {
84 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
85 meta: {
86 title: 'Muted instances'
87 }
88 }
89 }
90 ]
91 }
92 ]