]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/videos-routing.module.ts
Add peertube plugin index website models
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / videos-routing.module.ts
index 18ed5257064e00781860929746fdb2916d7e8056..505173a5b1746c4c9ec27e360dcb25b3d1cc5eee 100644 (file)
@@ -6,6 +6,7 @@ import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.c
 import { VideoTrendingComponent } from './video-list/video-trending.component'
 import { VideosComponent } from './videos.component'
 import { VideoUserSubscriptionsComponent } from '@app/videos/video-list/video-user-subscriptions.component'
+import { VideoOverviewComponent } from '@app/videos/video-list/video-overview.component'
 
 const videosRoutes: Routes = [
   {
@@ -13,12 +14,25 @@ const videosRoutes: Routes = [
     component: VideosComponent,
     canActivateChild: [ MetaGuard ],
     children: [
+      {
+        path: 'overview',
+        component: VideoOverviewComponent,
+        data: {
+          meta: {
+            title: 'Videos overview'
+          }
+        }
+      },
       {
         path: 'trending',
         component: VideoTrendingComponent,
         data: {
           meta: {
             title: 'Trending videos'
+          },
+          reuse: {
+            enabled: true,
+            key: 'trending-videos-list'
           }
         }
       },
@@ -28,6 +42,10 @@ const videosRoutes: Routes = [
         data: {
           meta: {
             title: 'Recently added videos'
+          },
+          reuse: {
+            enabled: true,
+            key: 'recently-added-videos-list'
           }
         }
       },
@@ -37,6 +55,10 @@ const videosRoutes: Routes = [
         data: {
           meta: {
             title: 'Subscriptions'
+          },
+          reuse: {
+            enabled: true,
+            key: 'subscription-videos-list'
           }
         }
       },
@@ -46,6 +68,10 @@ const videosRoutes: Routes = [
         data: {
           meta: {
             title: 'Local videos'
+          },
+          reuse: {
+            enabled: true,
+            key: 'local-videos-list'
           }
         }
       },
@@ -68,11 +94,7 @@ const videosRoutes: Routes = [
         }
       },
       {
-        path: 'watch/:uuid/comments/:commentId',
-        redirectTo: 'watch/:uuid'
-      },
-      {
-        path: 'watch/:uuid',
+        path: 'watch',
         loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
         data: {
           preload: 3000