1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { LoginGuard } from '@app/core'
4 import { MetaGuard } from '@ngx-meta/core'
5 import { VideoOverviewComponent } from './video-list/overview/video-overview.component'
6 import { VideoLocalComponent } from './video-list/video-local.component'
7 import { VideoMostLikedComponent } from './video-list/video-most-liked.component'
8 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
9 import { VideoTrendingComponent } from './video-list/video-trending.component'
10 import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component'
11 import { VideosComponent } from './videos.component'
13 const videosRoutes: Routes = [
16 component: VideosComponent,
17 canActivateChild: [ MetaGuard ],
21 component: VideoOverviewComponent,
24 title: $localize`Discover videos`
30 component: VideoTrendingComponent,
33 title: $localize`Trending videos`
37 key: 'trending-videos-list'
43 component: VideoMostLikedComponent,
46 title: $localize`Most liked videos`
50 key: 'most-liked-videos-list'
55 path: 'recently-added',
56 component: VideoRecentlyAddedComponent,
59 title: $localize`Recently added videos`
63 key: 'recently-added-videos-list'
68 path: 'subscriptions',
69 canActivate: [ LoginGuard ],
70 component: VideoUserSubscriptionsComponent,
73 title: $localize`Subscriptions`
77 key: 'subscription-videos-list'
83 component: VideoLocalComponent,
86 title: $localize`Local videos`
90 key: 'local-videos-list'
96 loadChildren: () => import('@app/+videos/+video-edit/video-add.module').then(m => m.VideoAddModule),
99 title: $localize`Upload a video`
104 path: 'update/:uuid',
105 loadChildren: () => import('@app/+videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule),
108 title: $localize`Edit a video`
114 loadChildren: () => import('@app/+videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule),
124 imports: [ RouterModule.forChild(videosRoutes) ],
125 exports: [ RouterModule ]
127 export class VideosRoutingModule {}