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