From 937b7a6af8f5385ca2b6454f1e1e71d9275b6ac0 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 9 Mar 2020 10:22:11 +0100 Subject: [PATCH] Better display of accounts and channel pages on small screens --- client/src/app/+accounts/accounts.component.html | 2 +- client/src/app/+accounts/accounts.component.ts | 6 ++++++ .../src/app/+video-channels/video-channels.component.html | 4 ++-- .../src/app/+video-channels/video-channels.component.ts | 8 +++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html index 6a76393b9..8498fb16f 100644 --- a/client/src/app/+accounts/accounts.component.html +++ b/client/src/app/+accounts/accounts.component.html @@ -32,7 +32,7 @@
- Manage + Manage
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index 2ca6062c2..bf71179f3 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts @@ -11,6 +11,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' +import { ScreenService } from '@app/shared/misc/screen.service' @Component({ templateUrl: './accounts.component.html', @@ -36,6 +37,7 @@ export class AccountsComponent implements OnInit, OnDestroy { private restExtractor: RestExtractor, private redirectService: RedirectService, private authService: AuthService, + private screenService: ScreenService, private i18n: I18n ) { } @@ -91,6 +93,10 @@ export class AccountsComponent implements OnInit, OnDestroy { ) } + get isInSmallView () { + return this.screenService.isInSmallView() + } + onUserChanged () { this.getUserIfNeeded(this.account) } diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html index 6192b8ae5..d210e2a4b 100644 --- a/client/src/app/+video-channels/video-channels.component.html +++ b/client/src/app/+video-channels/video-channels.component.html @@ -18,7 +18,7 @@
- Manage + Manage
@@ -26,7 +26,7 @@
{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}
- Created by {{ videoChannel.ownerBy }} + Created by{{ videoChannel.ownerBy }} Owner account avatar diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index 00b9938d9..f3cd5dea5 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts @@ -10,6 +10,7 @@ import { Hotkey, HotkeysService } from 'angular2-hotkeys' import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' import { I18n } from '@ngx-translate/i18n-polyfill' import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' +import { ScreenService } from '@app/shared/misc/screen.service' @Component({ templateUrl: './video-channels.component.html', @@ -32,7 +33,8 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { private authService: AuthService, private videoChannelService: VideoChannelService, private restExtractor: RestExtractor, - private hotkeysService: HotkeysService + private hotkeysService: HotkeysService, + private screenService: ScreenService ) { } ngOnInit () { @@ -79,6 +81,10 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { if (this.isUserLoggedIn()) this.hotkeysService.remove(this.hotkeys) } + get isInSmallView () { + return this.screenService.isInSmallView() + } + isUserLoggedIn () { return this.authService.isLoggedIn() } -- 2.41.0