]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/account/account-routing.module.ts
Begin videos of an account
[github/Chocobozzz/PeerTube.git] / client / src / app / account / account-routing.module.ts
index e9b8f703145a406c4ff19b93956353abd0f14d30..070b9b5c5cce96d3356bcfc3de47292e621f7fde 100644 (file)
@@ -1,17 +1,38 @@
 import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
 
+import { MetaGuard } from '@ngx-meta/core'
+
+import { LoginGuard } from '../core'
 import { AccountComponent } from './account.component'
+import { AccountSettingsComponent } from './account-settings/account-settings.component'
+import { AccountVideosComponent } from './account-videos/account-videos.component'
 
 const accountRoutes: Routes = [
   {
     path: 'account',
     component: AccountComponent,
-    data: {
-      meta: {
-        title: 'My account'
+    canActivateChild: [ MetaGuard, LoginGuard ],
+    children: [
+      {
+        path: 'settings',
+        component: AccountSettingsComponent,
+        data: {
+          meta: {
+            title: 'Account settings'
+          }
+        }
+      },
+      {
+        path: 'videos',
+        component: AccountVideosComponent,
+        data: {
+          meta: {
+            title: 'Account videos'
+          }
+        }
       }
-    }
+    ]
   }
 ]