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