]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/videos-routing.module.ts
Run hooks and register plugins outside angular
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / videos-routing.module.ts
CommitLineData
df98563e 1import { NgModule } from '@angular/core'
57c36b27 2import { RouterModule, Routes } from '@angular/router'
066e94c5 3import { VideoLocalComponent } from '@app/videos/video-list/video-local.component'
8b13c289 4import { MetaGuard } from '@ngx-meta/core'
9bf9d2a5
C
5import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
6import { VideoTrendingComponent } from './video-list/video-trending.component'
df98563e 7import { VideosComponent } from './videos.component'
22a16e36 8import { VideoUserSubscriptionsComponent } from '@app/videos/video-list/video-user-subscriptions.component'
2d3741d6 9import { VideoOverviewComponent } from '@app/videos/video-list/video-overview.component'
0629423c 10
693b1aba 11const videosRoutes: Routes = [
0629423c
C
12 {
13 path: 'videos',
14 component: VideosComponent,
8b13c289 15 canActivateChild: [ MetaGuard ],
0629423c 16 children: [
2d3741d6
C
17 {
18 path: 'overview',
19 component: VideoOverviewComponent,
20 data: {
21 meta: {
22 title: 'Videos overview'
23 }
24 }
25 },
0629423c 26 {
9bf9d2a5
C
27 path: 'trending',
28 component: VideoTrendingComponent,
29 data: {
30 meta: {
31 title: 'Trending videos'
489290b8
C
32 },
33 reuse: {
34 enabled: true,
35 key: 'trending-videos-list'
9bf9d2a5
C
36 }
37 }
38 },
39 {
40 path: 'recently-added',
41 component: VideoRecentlyAddedComponent,
b58c69a1
C
42 data: {
43 meta: {
9bf9d2a5 44 title: 'Recently added videos'
489290b8
C
45 },
46 reuse: {
47 enabled: true,
48 key: 'recently-added-videos-list'
b58c69a1
C
49 }
50 }
0629423c 51 },
066e94c5 52 {
22a16e36
C
53 path: 'subscriptions',
54 component: VideoUserSubscriptionsComponent,
55 data: {
56 meta: {
57 title: 'Subscriptions'
489290b8
C
58 },
59 reuse: {
60 enabled: true,
61 key: 'subscription-videos-list'
22a16e36
C
62 }
63 }
64 },
65 {
066e94c5
C
66 path: 'local',
67 component: VideoLocalComponent,
68 data: {
69 meta: {
70 title: 'Local videos'
489290b8
C
71 },
72 reuse: {
73 enabled: true,
74 key: 'local-videos-list'
066e94c5
C
75 }
76 }
77 },
0629423c 78 {
f47bf2e1 79 path: 'upload',
f36da21e 80 loadChildren: () => import('app/videos/+video-edit/video-add.module').then(m => m.VideoAddModule),
b58c69a1
C
81 data: {
82 meta: {
f47bf2e1 83 title: 'Upload a video'
b58c69a1
C
84 }
85 }
0629423c 86 },
d8e689b8 87 {
c663955b 88 path: 'update/:uuid',
f36da21e 89 loadChildren: () => import('app/videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule),
d8e689b8
C
90 data: {
91 meta: {
92 title: 'Edit a video'
93 }
94 }
95 },
91219e66 96 {
f0a39880 97 path: 'watch',
f36da21e 98 loadChildren: () => import('app/videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule),
a685e25c
C
99 data: {
100 preload: 3000
101 }
0629423c
C
102 }
103 ]
104 }
df98563e 105]
693b1aba
C
106
107@NgModule({
108 imports: [ RouterModule.forChild(videosRoutes) ],
109 exports: [ RouterModule ]
110})
111export class VideosRoutingModule {}