Fix videos list margin with hidden menu
[oweals/peertube.git] / client / src / app / videos / videos-routing.module.ts
1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { VideoLocalComponent } from '@app/videos/video-list/video-local.component'
4 import { MetaGuard } from '@ngx-meta/core'
5 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
6 import { VideoTrendingComponent } from './video-list/video-trending.component'
7 import { VideosComponent } from './videos.component'
8 import { VideoUserSubscriptionsComponent } from '@app/videos/video-list/video-user-subscriptions.component'
9 import { VideoOverviewComponent } from '@app/videos/video-list/video-overview.component'
10
11 const videosRoutes: Routes = [
12   {
13     path: 'videos',
14     component: VideosComponent,
15     canActivateChild: [ MetaGuard ],
16     children: [
17       {
18         path: 'overview',
19         component: VideoOverviewComponent,
20         data: {
21           meta: {
22             title: 'Videos overview'
23           }
24         }
25       },
26       {
27         path: 'trending',
28         component: VideoTrendingComponent,
29         data: {
30           meta: {
31             title: 'Trending videos'
32           },
33           reuse: {
34             enabled: true,
35             key: 'trending-videos-list'
36           }
37         }
38       },
39       {
40         path: 'recently-added',
41         component: VideoRecentlyAddedComponent,
42         data: {
43           meta: {
44             title: 'Recently added videos'
45           },
46           reuse: {
47             enabled: true,
48             key: 'recently-added-videos-list'
49           }
50         }
51       },
52       {
53         path: 'subscriptions',
54         component: VideoUserSubscriptionsComponent,
55         data: {
56           meta: {
57             title: 'Subscriptions'
58           },
59           reuse: {
60             enabled: true,
61             key: 'subscription-videos-list'
62           }
63         }
64       },
65       {
66         path: 'local',
67         component: VideoLocalComponent,
68         data: {
69           meta: {
70             title: 'Local videos'
71           },
72           reuse: {
73             enabled: true,
74             key: 'local-videos-list'
75           }
76         }
77       },
78       {
79         path: 'upload',
80         loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
81         data: {
82           meta: {
83             title: 'Upload a video'
84           }
85         }
86       },
87       {
88         path: 'update/:uuid',
89         loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
90         data: {
91           meta: {
92             title: 'Edit a video'
93           }
94         }
95       },
96       {
97         path: 'watch',
98         loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
99         data: {
100           preload: 3000
101         }
102       }
103     ]
104   }
105 ]
106
107 @NgModule({
108   imports: [ RouterModule.forChild(videosRoutes) ],
109   exports: [ RouterModule ]
110 })
111 export class VideosRoutingModule {}