]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/videos-routing.module.ts
Fetch things in bulk for the homepage
[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'
ba5d4a84 3import { LoginGuard } from '@app/core'
ba5d4a84 4import { VideoTrendingComponent } from './video-list'
1942f11d
C
5import { VideoOverviewComponent } from './video-list/overview/video-overview.component'
6import { VideoLocalComponent } from './video-list/video-local.component'
9bf9d2a5 7import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
67ed6552 8import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component'
1942f11d 9import { VideosComponent } from './videos.component'
0629423c 10
693b1aba 11const videosRoutes: Routes = [
0629423c 12 {
1942f11d 13 path: '',
0629423c
C
14 component: VideosComponent,
15 children: [
2d3741d6
C
16 {
17 path: 'overview',
18 component: VideoOverviewComponent,
19 data: {
20 meta: {
f29f487e 21 title: $localize`Discover videos`
2d3741d6
C
22 }
23 }
24 },
0629423c 25 {
9bf9d2a5 26 path: 'trending',
ba5d4a84 27 component: VideoTrendingComponent,
9bf9d2a5
C
28 data: {
29 meta: {
ba5d4a84 30 title: $localize`Trending videos`
5bcbcbe3
RK
31 }
32 }
33 },
c07eb946
JM
34 {
35 path: 'most-liked',
ba5d4a84 36 redirectTo: 'trending?alg=most-liked'
c07eb946 37 },
9bf9d2a5
C
38 {
39 path: 'recently-added',
40 component: VideoRecentlyAddedComponent,
b58c69a1
C
41 data: {
42 meta: {
f29f487e 43 title: $localize`Recently added videos`
489290b8
C
44 },
45 reuse: {
46 enabled: true,
47 key: 'recently-added-videos-list'
b58c69a1
C
48 }
49 }
0629423c 50 },
066e94c5 51 {
22a16e36 52 path: 'subscriptions',
b2dd58a8 53 canActivate: [ LoginGuard ],
22a16e36
C
54 component: VideoUserSubscriptionsComponent,
55 data: {
56 meta: {
f29f487e 57 title: $localize`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: {
f29f487e 70 title: $localize`Local videos`
489290b8
C
71 },
72 reuse: {
73 enabled: true,
74 key: 'local-videos-list'
066e94c5
C
75 }
76 }
0629423c
C
77 }
78 ]
79 }
df98563e 80]
693b1aba
C
81
82@NgModule({
83 imports: [ RouterModule.forChild(videosRoutes) ],
84 exports: [ RouterModule ]
85})
86export class VideosRoutingModule {}