<div class="logged-in-username">{{ user.username }}</div>
</div>
- <div class="logged-in-more" ngbDropdown placement="right-top auto" container="body" autoClose="outside">
+ <div class="logged-in-more" ngbDropdown [placement]="placement" container="body" autoClose="outside">
<my-global-icon iconName="more-vertical" ngbDropdownToggle role="button"></my-global-icon>
<div ngbDropdownMenu>
import { ServerConfig, VideoConstant } from '@shared/models'
import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component'
import { I18n } from '@ngx-translate/i18n-polyfill'
+import { ScreenService } from '@app/shared/misc/screen.service'
@Component({
selector: 'my-menu',
private serverService: ServerService,
private redirectService: RedirectService,
private hotkeysService: HotkeysService,
+ private screenService: ScreenService,
private i18n: I18n
- ) {}
+ ) { }
+
+ get isInMobileView () {
+ return this.screenService.isInMobileView()
+ }
+
+ get placement () {
+ if (this.isInMobileView) {
+ return 'left-top auto'
+ } else {
+ return 'right-top auto'
+ }
+ }
ngOnInit () {
this.serverConfig = this.serverService.getTmpConfig()