X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideos-routing.module.ts;h=66153e0337a354a2c4db7f1a3fa7d52c3066975b;hb=9e9afa455b11d1c7a722d7b9d23bf232bf397356;hp=225b6b018abc02bfb50dbf627b2d9f7069846cfe;hpb=a685e25ca05f08ad1b3f7fbaccc8744727bd8d27;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 225b6b018..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 } 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 = [ @@ -14,38 +15,66 @@ const videosRoutes: Routes = [ children: [ { path: 'list', - component: VideoListComponent, + pathMatch: 'full', + redirectTo: 'recently-added' + }, + { + path: 'trending', + component: VideoTrendingComponent, data: { meta: { - title: 'Videos list' + title: 'Trending videos' } } }, { - path: 'add', - loadChildren: 'app/videos/+video-edit#VideoAddModule', + path: 'recently-added', + component: VideoRecentlyAddedComponent, data: { meta: { - title: 'Add a video' + title: 'Recently added videos' } } }, { - path: 'edit/:uuid', - loadChildren: 'app/videos/+video-edit#VideoUpdateModule', + path: 'local', + component: VideoLocalComponent, data: { meta: { - title: 'Edit a video' + title: 'Local videos' + } + } + }, + { + path: 'search', + component: VideoSearchComponent, + data: { + meta: { + title: 'Search videos' } } }, { - path: ':uuid', - redirectTo: 'watch/:uuid' + path: 'upload', + loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule', + data: { + meta: { + title: 'Upload a video' + } + } + }, + { + path: 'update/:uuid', + loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule', + data: { + meta: { + title: 'Edit a video' + } + } }, { path: 'watch/:uuid', - loadChildren: 'app/videos/+video-watch#VideoWatchModule', + loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule', data: { preload: 3000 }