]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/videos-routing.module.ts
fix video update button, add color to danger zone
[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'
8b13c289 3import { MetaGuard } from '@ngx-meta/core'
1942f11d
C
4import { VideoOverviewComponent } from './video-list/overview/video-overview.component'
5import { VideoLocalComponent } from './video-list/video-local.component'
6import { VideoMostLikedComponent } from './video-list/video-most-liked.component'
9bf9d2a5
C
7import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
8import { VideoTrendingComponent } from './video-list/video-trending.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: {
eddd9209 23 title: 'Discover videos'
2d3741d6
C
24 }
25 }
26 },
0629423c 27 {
9bf9d2a5
C
28 path: 'trending',
29 component: VideoTrendingComponent,
30 data: {
31 meta: {
32 title: 'Trending videos'
489290b8
C
33 },
34 reuse: {
35 enabled: true,
36 key: 'trending-videos-list'
9bf9d2a5
C
37 }
38 }
39 },
c07eb946
JM
40 {
41 path: 'most-liked',
42 component: VideoMostLikedComponent,
43 data: {
44 meta: {
45 title: 'Most liked videos'
46 },
47 reuse: {
48 enabled: true,
49 key: 'most-liked-videos-list'
50 }
51 }
52 },
9bf9d2a5
C
53 {
54 path: 'recently-added',
55 component: VideoRecentlyAddedComponent,
b58c69a1
C
56 data: {
57 meta: {
9bf9d2a5 58 title: 'Recently added videos'
489290b8
C
59 },
60 reuse: {
61 enabled: true,
62 key: 'recently-added-videos-list'
b58c69a1
C
63 }
64 }
0629423c 65 },
066e94c5 66 {
22a16e36
C
67 path: 'subscriptions',
68 component: VideoUserSubscriptionsComponent,
69 data: {
70 meta: {
71 title: 'Subscriptions'
489290b8
C
72 },
73 reuse: {
74 enabled: true,
75 key: 'subscription-videos-list'
22a16e36
C
76 }
77 }
78 },
79 {
066e94c5
C
80 path: 'local',
81 component: VideoLocalComponent,
82 data: {
83 meta: {
84 title: 'Local videos'
489290b8
C
85 },
86 reuse: {
87 enabled: true,
88 key: 'local-videos-list'
066e94c5
C
89 }
90 }
91 },
0629423c 92 {
f47bf2e1 93 path: 'upload',
1942f11d 94 loadChildren: () => import('@app/+videos/+video-edit/video-add.module').then(m => m.VideoAddModule),
b58c69a1
C
95 data: {
96 meta: {
f47bf2e1 97 title: 'Upload a video'
b58c69a1
C
98 }
99 }
0629423c 100 },
d8e689b8 101 {
c663955b 102 path: 'update/:uuid',
1942f11d 103 loadChildren: () => import('@app/+videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule),
d8e689b8
C
104 data: {
105 meta: {
106 title: 'Edit a video'
107 }
108 }
109 },
91219e66 110 {
f0a39880 111 path: 'watch',
1942f11d 112 loadChildren: () => import('@app/+videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule),
a685e25c
C
113 data: {
114 preload: 3000
115 }
0629423c
C
116 }
117 ]
118 }
df98563e 119]
693b1aba
C
120
121@NgModule({
122 imports: [ RouterModule.forChild(videosRoutes) ],
123 exports: [ RouterModule ]
124})
125export class VideosRoutingModule {}