]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/videos-routing.module.ts
Add "local" videos in menu
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / videos-routing.module.ts
index 204851c81ecd8326f44dde1eaa22f604bb2666ac..561137b7013ed3391a2c47a0294953d9019ab713 100644 (file)
@@ -1,6 +1,8 @@
 import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
+import { VideoLocalComponent } from '@app/videos/video-list/video-local.component'
 import { MetaGuard } from '@ngx-meta/core'
+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'
@@ -34,9 +36,27 @@ const videosRoutes: Routes = [
           }
         }
       },
+      {
+        path: 'local',
+        component: VideoLocalComponent,
+        data: {
+          meta: {
+            title: 'Local videos'
+          }
+        }
+      },
+      {
+        path: 'search',
+        component: VideoSearchComponent,
+        data: {
+          meta: {
+            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'
@@ -45,7 +65,7 @@ const videosRoutes: Routes = [
       },
       {
         path: 'edit/:uuid',
-        loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
+        loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
         data: {
           meta: {
             title: 'Edit a video'
@@ -54,11 +74,12 @@ const videosRoutes: Routes = [
       },
       {
         path: ':uuid',
+        pathMatch: 'full',
         redirectTo: 'watch/:uuid'
       },
       {
         path: 'watch/:uuid',
-        loadChildren: 'app/videos/+video-watch#VideoWatchModule',
+        loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
         data: {
           preload: 3000
         }