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 { VideoHotComponent } from './video-list/trending/video-hot.component'
7 import { VideoMostLikedComponent } from './video-list/trending/video-most-liked.component'
8 import { VideoTrendingComponent } from './video-list/trending/video-trending.component'
9 import { VideoLocalComponent } from './video-list/video-local.component'
10 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
11 import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component'
12 import { VideosComponent } from './videos.component'
14 const videosRoutes: Routes = [
17 component: VideosComponent,
18 canActivateChild: [ MetaGuard ],
22 component: VideoOverviewComponent,
25 title: $localize`Discover videos`
31 component: VideoTrendingComponent,
34 title: $localize`Trending videos`
38 key: 'trending-videos-list'
44 component: VideoHotComponent,
47 title: $localize`Hot videos`
51 key: 'hot-videos-list'
57 component: VideoMostLikedComponent,
60 title: $localize`Most liked videos`
64 key: 'most-liked-videos-list'
69 path: 'recently-added',
70 component: VideoRecentlyAddedComponent,
73 title: $localize`Recently added videos`
77 key: 'recently-added-videos-list'
82 path: 'subscriptions',
83 canActivate: [ LoginGuard ],
84 component: VideoUserSubscriptionsComponent,
87 title: $localize`Subscriptions`
91 key: 'subscription-videos-list'
97 component: VideoLocalComponent,
100 title: $localize`Local videos`
104 key: 'local-videos-list'
110 loadChildren: () => import('@app/+videos/+video-edit/video-add.module').then(m => m.VideoAddModule),
113 title: $localize`Upload a video`
118 path: 'update/:uuid',
119 loadChildren: () => import('@app/+videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule),
122 title: $localize`Edit a video`
128 loadChildren: () => import('@app/+videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule),
138 imports: [ RouterModule.forChild(videosRoutes) ],
139 exports: [ RouterModule ]
141 export class VideosRoutingModule {}