]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/app-routing.module.ts
Merge branch 'develop' into shorter-URLs-channels-accounts
[github/Chocobozzz/PeerTube.git] / client / src / app / app-routing.module.ts
index 0a43ab0ad82b3788b4d02fdd49c6b30ffa385125..4619c404642020344baa4c4d0cb15447ba839890 100644 (file)
@@ -3,7 +3,7 @@ import { RouteReuseStrategy, RouterModule, Routes, UrlMatchResult, UrlSegment }
 import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
 import { MenuGuards } from '@app/core/routing/menu-guard.service'
 import { POSSIBLE_LOCALES } from '@shared/core-utils/i18n'
-import { PreloadSelectedModulesList } from './core'
+import { MetaGuard, PreloadSelectedModulesList } from './core'
 import { EmptyComponent } from './empty.component'
 import { RootComponent } from './root.component'
 
@@ -12,55 +12,72 @@ const routes: Routes = [
     path: 'admin',
     canActivate: [ MenuGuards.close() ],
     canDeactivate: [ MenuGuards.open() ],
-    loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule)
+    loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule),
+    canActivateChild: [ MetaGuard ]
+  },
+  {
+    path: 'home',
+    loadChildren: () => import('./+home/home.module').then(m => m.HomeModule)
   },
   {
     path: 'my-account',
-    loadChildren: () => import('./+my-account/my-account.module').then(m => m.MyAccountModule)
+    loadChildren: () => import('./+my-account/my-account.module').then(m => m.MyAccountModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'my-library',
-    loadChildren: () => import('./+my-library/my-library.module').then(m => m.MyLibraryModule)
+    loadChildren: () => import('./+my-library/my-library.module').then(m => m.MyLibraryModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'verify-account',
-    loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule)
+    loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'a',
-    loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule)
+    loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'c',
-    loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule)
+    loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'about',
-    loadChildren: () => import('./+about/about.module').then(m => m.AboutModule)
+    loadChildren: () => import('./+about/about.module').then(m => m.AboutModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'signup',
-    loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule)
+    loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'reset-password',
-    loadChildren: () => import('./+reset-password/reset-password.module').then(m => m.ResetPasswordModule)
+    loadChildren: () => import('./+reset-password/reset-password.module').then(m => m.ResetPasswordModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'login',
-    loadChildren: () => import('./+login/login.module').then(m => m.LoginModule)
+    loadChildren: () => import('./+login/login.module').then(m => m.LoginModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'search',
-    loadChildren: () => import('./+search/search.module').then(m => m.SearchModule)
+    loadChildren: () => import('./+search/search.module').then(m => m.SearchModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'videos',
-    loadChildren: () => import('./+videos/videos.module').then(m => m.VideosModule)
+    loadChildren: () => import('./+videos/videos.module').then(m => m.VideosModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'remote-interaction',
-    loadChildren: () => import('./+remote-interaction/remote-interaction.module').then(m => m.RemoteInteractionModule)
+    loadChildren: () => import('./+remote-interaction/remote-interaction.module').then(m => m.RemoteInteractionModule),
+    canActivateChild: [ MetaGuard ]
   },
   {
     path: 'video-playlists/watch',