]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/videos-routing.module.ts
Videos overview page: first version
[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'
32 }
33 }
34 },
35 {
36 path: 'recently-added',
37 component: VideoRecentlyAddedComponent,
b58c69a1
C
38 data: {
39 meta: {
9bf9d2a5 40 title: 'Recently added videos'
b58c69a1
C
41 }
42 }
0629423c 43 },
066e94c5 44 {
22a16e36
C
45 path: 'subscriptions',
46 component: VideoUserSubscriptionsComponent,
47 data: {
48 meta: {
49 title: 'Subscriptions'
50 }
51 }
52 },
53 {
066e94c5
C
54 path: 'local',
55 component: VideoLocalComponent,
56 data: {
57 meta: {
58 title: 'Local videos'
59 }
60 }
61 },
0629423c 62 {
f47bf2e1 63 path: 'upload',
63c4db6d 64 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
b58c69a1
C
65 data: {
66 meta: {
f47bf2e1 67 title: 'Upload a video'
b58c69a1
C
68 }
69 }
0629423c 70 },
d8e689b8 71 {
c663955b 72 path: 'update/:uuid',
63c4db6d 73 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
d8e689b8
C
74 data: {
75 meta: {
76 title: 'Edit a video'
77 }
78 }
79 },
91219e66
C
80 {
81 path: 'watch/:uuid/comments/:commentId',
82 redirectTo: 'watch/:uuid'
83 },
0629423c 84 {
0a6658fd 85 path: 'watch/:uuid',
63c4db6d 86 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
a685e25c
C
87 data: {
88 preload: 3000
89 }
0629423c
C
90 }
91 ]
92 }
df98563e 93]
693b1aba
C
94
95@NgModule({
96 imports: [ RouterModule.forChild(videosRoutes) ],
97 exports: [ RouterModule ]
98})
99export class VideosRoutingModule {}