aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/menu')
-rw-r--r--client/src/app/menu/menu.component.ts21
1 files changed, 8 insertions, 13 deletions
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 9b6b7cda5..8fa1de326 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -1,16 +1,16 @@
1import { ViewportScroller } from '@angular/common'
2import { HotkeysService } from 'angular2-hotkeys' 1import { HotkeysService } from 'angular2-hotkeys'
3import * as debug from 'debug' 2import * as debug from 'debug'
4import { switchMap } from 'rxjs/operators' 3import { switchMap } from 'rxjs/operators'
4import { ViewportScroller } from '@angular/common'
5import { Component, OnInit, ViewChild } from '@angular/core' 5import { Component, OnInit, ViewChild } from '@angular/core'
6import { Router } from '@angular/router' 6import { Router } from '@angular/router'
7import { scrollToTop } from '@app/helpers'
8import { AuthService, AuthStatus, AuthUser, MenuService, RedirectService, ScreenService, ServerService, UserService } from '@app/core' 7import { AuthService, AuthStatus, AuthUser, MenuService, RedirectService, ScreenService, ServerService, UserService } from '@app/core'
8import { scrollToTop } from '@app/helpers'
9import { LanguageChooserComponent } from '@app/menu/language-chooser.component' 9import { LanguageChooserComponent } from '@app/menu/language-chooser.component'
10import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' 10import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component'
11import { ServerConfig, UserRight, VideoConstant } from '@shared/models'
12import { NgbDropdown, NgbDropdownConfig } from '@ng-bootstrap/ng-bootstrap'
13import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' 11import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service'
12import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
13import { ServerConfig, UserRight, VideoConstant } from '@shared/models'
14 14
15const logger = debug('peertube:menu:MenuComponent') 15const logger = debug('peertube:menu:MenuComponent')
16 16
@@ -56,22 +56,17 @@ export class MenuComponent implements OnInit {
56 private screenService: ScreenService, 56 private screenService: ScreenService,
57 private menuService: MenuService, 57 private menuService: MenuService,
58 private modalService: PeertubeModalService, 58 private modalService: PeertubeModalService,
59 private dropdownConfig: NgbDropdownConfig,
60 private router: Router 59 private router: Router
61 ) { 60 ) { }
62 this.dropdownConfig.container = 'body'
63 }
64 61
65 get isInMobileView () { 62 get isInMobileView () {
66 return this.screenService.isInMobileView() 63 return this.screenService.isInMobileView()
67 } 64 }
68 65
69 get dropdownContainer () { 66 get dropdownContainer () {
70 if (this.isInMobileView) { 67 if (this.isInMobileView) return null
71 return null 68
72 } else { 69 return 'body' as 'body'
73 return this.dropdownConfig.container
74 }
75 } 70 }
76 71
77 get language () { 72 get language () {