aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r--client/src/app/menu/menu.component.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 75bae090e..015c14bce 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -8,6 +8,7 @@ import { HotkeysService } from 'angular2-hotkeys'
8import { ServerConfig, VideoConstant } from '@shared/models' 8import { ServerConfig, VideoConstant } from '@shared/models'
9import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' 9import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component'
10import { I18n } from '@ngx-translate/i18n-polyfill' 10import { I18n } from '@ngx-translate/i18n-polyfill'
11import { ScreenService } from '@app/shared/misc/screen.service'
11 12
12@Component({ 13@Component({
13 selector: 'my-menu', 14 selector: 'my-menu',
@@ -43,8 +44,21 @@ export class MenuComponent implements OnInit {
43 private serverService: ServerService, 44 private serverService: ServerService,
44 private redirectService: RedirectService, 45 private redirectService: RedirectService,
45 private hotkeysService: HotkeysService, 46 private hotkeysService: HotkeysService,
47 private screenService: ScreenService,
46 private i18n: I18n 48 private i18n: I18n
47 ) {} 49 ) { }
50
51 get isInMobileView () {
52 return this.screenService.isInMobileView()
53 }
54
55 get placement () {
56 if (this.isInMobileView) {
57 return 'left-top auto'
58 } else {
59 return 'right-top auto'
60 }
61 }
48 62
49 ngOnInit () { 63 ngOnInit () {
50 this.serverConfig = this.serverService.getTmpConfig() 64 this.serverConfig = this.serverService.getTmpConfig()