]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/menu/menu.component.ts
Update angular
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / menu.component.ts
index 9b3608b156594311553833561ec49dfe452632a9..c7c31577ae66f66f40efaf119367b8cb93eacd55 100644 (file)
@@ -11,14 +11,14 @@ import { HotkeysService } from 'angular2-hotkeys'
   styleUrls: [ './menu.component.scss' ]
 })
 export class MenuComponent implements OnInit {
-  @ViewChild('languageChooserModal') languageChooserModal: LanguageChooserComponent
+  @ViewChild('languageChooserModal', { static: true }) languageChooserModal: LanguageChooserComponent
 
   user: User
   isLoggedIn: boolean
   userHasAdminAccess = false
   helpVisible = false
 
-  private routesPerRight = {
+  private routesPerRight: { [ role in UserRight ]?: string } = {
     [UserRight.MANAGE_USERS]: '/admin/users',
     [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends',
     [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses',
@@ -32,7 +32,7 @@ export class MenuComponent implements OnInit {
     private serverService: ServerService,
     private redirectService: RedirectService,
     private themeService: ThemeService,
-    private hotkeysService: HotkeysService
+    private hotkeysService: HotkeysService
   ) {}
 
   ngOnInit () {
@@ -112,10 +112,6 @@ export class MenuComponent implements OnInit {
     this.hotkeysService.cheatSheetToggle.next(!this.helpVisible)
   }
 
-  toggleDarkTheme () {
-    this.themeService.toggleDarkTheme()
-  }
-
   private computeIsUserHasAdminAccess () {
     const right = this.getFirstAdminRightAvailable()