1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { LoginGuard } from '@app/core'
4 import { VideoTrendingComponent } from './video-list'
5 import { VideoOverviewComponent } from './video-list/overview/video-overview.component'
6 import { VideoLocalComponent } from './video-list/video-local.component'
7 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
8 import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component'
9 import { VideosComponent } from './videos.component'
11 const videosRoutes: Routes = [
14 component: VideosComponent,
18 component: VideoOverviewComponent,
21 title: $localize`Discover videos`
27 component: VideoTrendingComponent,
30 title: $localize`Trending videos`
36 redirectTo: 'trending?alg=most-liked'
39 path: 'recently-added',
40 component: VideoRecentlyAddedComponent,
43 title: $localize`Recently added videos`
47 key: 'recently-added-videos-list'
52 path: 'subscriptions',
53 canActivate: [ LoginGuard ],
54 component: VideoUserSubscriptionsComponent,
57 title: $localize`Subscriptions`
61 key: 'subscription-videos-list'
67 component: VideoLocalComponent,
70 title: $localize`Local videos`
74 key: 'local-videos-list'
83 imports: [ RouterModule.forChild(videosRoutes) ],
84 exports: [ RouterModule ]
86 export class VideosRoutingModule {}