diff options
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r-- | client/src/app/menu/menu.component.ts | 21 |
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 @@ | |||
1 | import { ViewportScroller } from '@angular/common' | ||
2 | import { HotkeysService } from 'angular2-hotkeys' | 1 | import { HotkeysService } from 'angular2-hotkeys' |
3 | import * as debug from 'debug' | 2 | import * as debug from 'debug' |
4 | import { switchMap } from 'rxjs/operators' | 3 | import { switchMap } from 'rxjs/operators' |
4 | import { ViewportScroller } from '@angular/common' | ||
5 | import { Component, OnInit, ViewChild } from '@angular/core' | 5 | import { Component, OnInit, ViewChild } from '@angular/core' |
6 | import { Router } from '@angular/router' | 6 | import { Router } from '@angular/router' |
7 | import { scrollToTop } from '@app/helpers' | ||
8 | import { AuthService, AuthStatus, AuthUser, MenuService, RedirectService, ScreenService, ServerService, UserService } from '@app/core' | 7 | import { AuthService, AuthStatus, AuthUser, MenuService, RedirectService, ScreenService, ServerService, UserService } from '@app/core' |
8 | import { scrollToTop } from '@app/helpers' | ||
9 | import { LanguageChooserComponent } from '@app/menu/language-chooser.component' | 9 | import { LanguageChooserComponent } from '@app/menu/language-chooser.component' |
10 | import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' | 10 | import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' |
11 | import { ServerConfig, UserRight, VideoConstant } from '@shared/models' | ||
12 | import { NgbDropdown, NgbDropdownConfig } from '@ng-bootstrap/ng-bootstrap' | ||
13 | import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' | 11 | import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' |
12 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' | ||
13 | import { ServerConfig, UserRight, VideoConstant } from '@shared/models' | ||
14 | 14 | ||
15 | const logger = debug('peertube:menu:MenuComponent') | 15 | const 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 () { |