X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideos-routing.module.ts;h=da786c0f98a1c2fe6ff211c7b6717691c816ee97;hb=91219e66c4b57b62ccdad7d944100fad3fdf6c26;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..da786c0f9 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,8 +64,8 @@ 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' @@ -49,12 +73,12 @@ const videosRoutes: Routes = [ } }, { - path: ':uuid', + path: 'watch/:uuid/comments/:commentId', redirectTo: 'watch/:uuid' }, { path: 'watch/:uuid', - loadChildren: 'app/videos/+video-watch#VideoWatchModule', + loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule', data: { preload: 3000 }