X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideos-routing.module.ts;h=66153e0337a354a2c4db7f1a3fa7d52c3066975b;hb=9e9afa455b11d1c7a722d7b9d23bf232bf397356;hp=3ca3e54865d9fa446c0864df97f77e7bc1e74e64;hpb=fd45e8f43c2638478599ca75632518054461da85;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts index 3ca3e5486..66153e033 100644 --- a/client/src/app/videos/videos-routing.module.ts +++ b/client/src/app/videos/videos-routing.module.ts @@ -1,9 +1,10 @@ import { NgModule } from '@angular/core' -import { RouterModule, Routes } from '@angular/router' - +import { RouterModule, Routes, UrlSegment } from '@angular/router' +import { VideoLocalComponent } from '@app/videos/video-list/video-local.component' import { MetaGuard } from '@ngx-meta/core' - -import { VideoListComponent, MyVideosComponent } from './video-list' +import { VideoSearchComponent } from './video-list' +import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component' +import { VideoTrendingComponent } from './video-list/video-trending.component' import { VideosComponent } from './videos.component' const videosRoutes: Routes = [ @@ -13,26 +14,49 @@ const videosRoutes: Routes = [ canActivateChild: [ MetaGuard ], children: [ { - path: 'mine', - component: MyVideosComponent, + path: 'list', + pathMatch: 'full', + redirectTo: 'recently-added' + }, + { + path: 'trending', + component: VideoTrendingComponent, data: { meta: { - title: 'My videos' + title: 'Trending videos' } } }, { - path: 'list', - component: VideoListComponent, + path: 'recently-added', + component: VideoRecentlyAddedComponent, + data: { + meta: { + title: 'Recently added videos' + } + } + }, + { + path: 'local', + component: VideoLocalComponent, + data: { + meta: { + title: 'Local videos' + } + } + }, + { + path: 'search', + component: VideoSearchComponent, data: { meta: { - title: 'Videos list' + title: 'Search videos' } } }, { path: 'upload', - loadChildren: 'app/videos/+video-edit#VideoAddModule', + loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule', data: { meta: { title: 'Upload a video' @@ -40,21 +64,17 @@ const videosRoutes: Routes = [ } }, { - path: 'edit/:uuid', - loadChildren: 'app/videos/+video-edit#VideoUpdateModule', + path: 'update/:uuid', + loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule', data: { meta: { title: 'Edit a video' } } }, - { - path: ':uuid', - redirectTo: 'watch/:uuid' - }, { path: 'watch/:uuid', - loadChildren: 'app/videos/+video-watch#VideoWatchModule', + loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule', data: { preload: 3000 }