]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+accounts/accounts-routing.module.ts
Merge branch 'release/4.0.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / accounts-routing.module.ts
index ffe606b4372aa5b7d7c56a80e4f0c71c00c92b31..d80df2293e5e19b6b600b24a1e9ec576b28e94ea 100644 (file)
@@ -1,48 +1,50 @@
 import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
-import { MetaGuard } from '@ngx-meta/core'
-import { AccountsComponent } from './accounts.component'
-import { AccountVideosComponent } from './account-videos/account-videos.component'
-import { AccountAboutComponent } from './account-about/account-about.component'
 import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component'
+import { AccountVideosComponent } from './account-videos/account-videos.component'
+import { AccountsComponent } from './accounts.component'
 
 const accountsRoutes: Routes = [
+  {
+    path: 'peertube',
+    redirectTo: '/videos/local'
+  },
   {
     path: ':accountId',
     component: AccountsComponent,
-    canActivateChild: [ MetaGuard ],
     children: [
       {
         path: '',
-        redirectTo: 'videos',
+        redirectTo: 'video-channels',
         pathMatch: 'full'
       },
-      {
-        path: 'videos',
-        component: AccountVideosComponent,
-        data: {
-          meta: {
-            title: 'Account videos'
-          }
-        }
-      },
       {
         path: 'video-channels',
         component: AccountVideoChannelsComponent,
         data: {
           meta: {
-            title: 'Account video channels'
+            title: $localize`Account video channels`
           }
         }
       },
       {
-        path: 'about',
-        component: AccountAboutComponent,
+        path: 'videos',
+        component: AccountVideosComponent,
         data: {
           meta: {
-            title: 'About account'
+            title: $localize`Account videos`
+          },
+          reuse: {
+            enabled: true,
+            key: 'account-videos-list'
           }
         }
+      },
+
+      // Old URL redirection
+      {
+        path: 'search',
+        redirectTo: 'videos'
       }
     ]
   }