aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app-routing.module.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-03-07 13:50:26 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-03-10 16:22:52 +0100
commit3b20bdd6dc7402b0723e038c57f0606131e20e54 (patch)
tree68b203892c15c524f57651bfda7e6d5c0e920443 /client/src/app/app-routing.module.ts
parent7b81edc854902a536083298472bf92bb6726edcf (diff)
downloadPeerTube-3b20bdd6dc7402b0723e038c57f0606131e20e54.tar.gz
PeerTube-3b20bdd6dc7402b0723e038c57f0606131e20e54.tar.zst
PeerTube-3b20bdd6dc7402b0723e038c57f0606131e20e54.zip
Servicify menu, close menu on admin for small and medium screens
Diffstat (limited to 'client/src/app/app-routing.module.ts')
-rw-r--r--client/src/app/app-routing.module.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts
index b5a677d15..a87f4ce1b 100644
--- a/client/src/app/app-routing.module.ts
+++ b/client/src/app/app-routing.module.ts
@@ -4,10 +4,13 @@ import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router'
4import { PreloadSelectedModulesList } from './core' 4import { PreloadSelectedModulesList } from './core'
5import { AppComponent } from '@app/app.component' 5import { AppComponent } from '@app/app.component'
6import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' 6import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
7import { MenuGuards } from '@app/core/routing/menu-guard.service'
7 8
8const routes: Routes = [ 9const routes: Routes = [
9 { 10 {
10 path: 'admin', 11 path: 'admin',
12 canActivate: [ MenuGuards.close() ],
13 canDeactivate: [ MenuGuards.open() ],
11 loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule) 14 loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule)
12 }, 15 },
13 { 16 {
@@ -54,6 +57,7 @@ const routes: Routes = [
54 }) 57 })
55 ], 58 ],
56 providers: [ 59 providers: [
60 MenuGuards.guards,
57 PreloadSelectedModulesList, 61 PreloadSelectedModulesList,
58 { provide: RouteReuseStrategy, useClass: CustomReuseStrategy } 62 { provide: RouteReuseStrategy, useClass: CustomReuseStrategy }
59 ], 63 ],