]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/videos-routing.module.ts
Update readme screenshot with new design
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / videos-routing.module.ts
CommitLineData
df98563e
C
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
8b13c289 3import { MetaGuard } from '@ngx-meta/core'
f3aaa9a9 4import { VideoSearchComponent } from './video-list'
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'
0629423c 8
693b1aba 9const videosRoutes: Routes = [
0629423c
C
10 {
11 path: 'videos',
12 component: VideosComponent,
8b13c289 13 canActivateChild: [ MetaGuard ],
0629423c 14 children: [
9bf9d2a5
C
15 {
16 path: 'list',
17 pathMatch: 'full',
18 redirectTo: 'recently-added'
19 },
0629423c 20 {
9bf9d2a5
C
21 path: 'trending',
22 component: VideoTrendingComponent,
23 data: {
24 meta: {
25 title: 'Trending videos'
26 }
27 }
28 },
29 {
30 path: 'recently-added',
31 component: VideoRecentlyAddedComponent,
b58c69a1
C
32 data: {
33 meta: {
9bf9d2a5 34 title: 'Recently added videos'
b58c69a1
C
35 }
36 }
0629423c 37 },
f3aaa9a9
C
38 {
39 path: 'search',
40 component: VideoSearchComponent,
41 data: {
42 meta: {
43 title: 'Search videos'
44 }
45 }
46 },
0629423c 47 {
f47bf2e1 48 path: 'upload',
a685e25c 49 loadChildren: 'app/videos/+video-edit#VideoAddModule',
b58c69a1
C
50 data: {
51 meta: {
f47bf2e1 52 title: 'Upload a video'
b58c69a1
C
53 }
54 }
0629423c 55 },
d8e689b8 56 {
0a6658fd 57 path: 'edit/:uuid',
a685e25c 58 loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
d8e689b8
C
59 data: {
60 meta: {
61 title: 'Edit a video'
62 }
63 }
64 },
da19d94b 65 {
0a6658fd 66 path: ':uuid',
f3aaa9a9 67 pathMatch: 'full',
0a6658fd 68 redirectTo: 'watch/:uuid'
da19d94b 69 },
0629423c 70 {
0a6658fd 71 path: 'watch/:uuid',
a685e25c
C
72 loadChildren: 'app/videos/+video-watch#VideoWatchModule',
73 data: {
74 preload: 3000
75 }
0629423c
C
76 }
77 ]
78 }
df98563e 79]
693b1aba
C
80
81@NgModule({
82 imports: [ RouterModule.forChild(videosRoutes) ],
83 exports: [ RouterModule ]
84})
85export class VideosRoutingModule {}