X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fmenu%2Fmenu.component.ts;h=79bf29e9c72501edbe666a39bc702a972fad7cff;hb=5baee5fca418487e72ddcd6419d31bca8659b668;hp=75bae090ea5e82bf31d88d103bbb86400c1293dc;hpb=bb3933ef370c46be6090e4e522c6e3f5b7144f4c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 75bae090e..79bf29e9c 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' 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', @@ -32,7 +33,7 @@ export class MenuComponent implements OnInit { [UserRight.MANAGE_USERS]: '/admin/users', [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses', - [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/moderation/video-blacklist', + [UserRight.MANAGE_VIDEO_BLOCKS]: '/admin/moderation/video-blocks', [UserRight.MANAGE_JOBS]: '/admin/jobs', [UserRight.MANAGE_CONFIGURATION]: '/admin/config' } @@ -43,8 +44,21 @@ export class MenuComponent implements OnInit { 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() @@ -117,7 +131,7 @@ export class MenuComponent implements OnInit { UserRight.MANAGE_USERS, UserRight.MANAGE_SERVER_FOLLOW, UserRight.MANAGE_VIDEO_ABUSES, - UserRight.MANAGE_VIDEO_BLACKLIST, + UserRight.MANAGE_VIDEO_BLOCKS, UserRight.MANAGE_JOBS, UserRight.MANAGE_CONFIGURATION ]