]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/account/account-routing.module.ts
Design signup and login pages
[github/Chocobozzz/PeerTube.git] / client / src / app / account / account-routing.module.ts
index 9004605f357e0b4c13c0822f6b10e4a764154bd3..070b9b5c5cce96d3356bcfc3de47292e621f7fde 100644 (file)
@@ -1,19 +1,40 @@
-import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
+import { NgModule } from '@angular/core'
+import { RouterModule, Routes } from '@angular/router'
 
-import { AccountComponent } from './account.component';
+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'
+          }
+        }
       }
-    }
+    ]
   }
-];
+]
 
 @NgModule({
   imports: [ RouterModule.forChild(accountRoutes) ],