diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-09 10:22:11 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-09 10:22:11 +0100 |
commit | 937b7a6af8f5385ca2b6454f1e1e71d9275b6ac0 (patch) | |
tree | 7f08e2b46140a80eb0fd517ac11e2d97ac34716d /client/src/app/+video-channels | |
parent | 61b20252a087e6403b34ef9bdc4fe6fb05936dfb (diff) | |
download | PeerTube-937b7a6af8f5385ca2b6454f1e1e71d9275b6ac0.tar.gz PeerTube-937b7a6af8f5385ca2b6454f1e1e71d9275b6ac0.tar.zst PeerTube-937b7a6af8f5385ca2b6454f1e1e71d9275b6ac0.zip |
Better display of accounts and channel pages on small screens
Diffstat (limited to 'client/src/app/+video-channels')
-rw-r--r-- | client/src/app/+video-channels/video-channels.component.html | 4 | ||||
-rw-r--r-- | client/src/app/+video-channels/video-channels.component.ts | 8 |
2 files changed, 9 insertions, 3 deletions
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 @@ | |||
18 | </div> | 18 | </div> |
19 | 19 | ||
20 | <div class="right-buttons"> | 20 | <div class="right-buttons"> |
21 | <a *ngIf="isChannelManageable" [routerLink]="[ '/my-account/video-channels/update', videoChannel.nameWithHost ]" class="btn btn-outline-tertiary mr-2" i18n>Manage</a> | 21 | <a *ngIf="isChannelManageable && !isInSmallView" [routerLink]="[ '/my-account/video-channels/update', videoChannel.nameWithHost ]" class="btn btn-outline-tertiary mr-2" i18n>Manage</a> |
22 | <my-subscribe-button #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button> | 22 | <my-subscribe-button #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button> |
23 | </div> | 23 | </div> |
24 | 24 | ||
@@ -26,7 +26,7 @@ | |||
26 | <div class="actor-followers" i18n>{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</div> | 26 | <div class="actor-followers" i18n>{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</div> |
27 | 27 | ||
28 | <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Go the owner account page" class="actor-owner"> | 28 | <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Go the owner account page" class="actor-owner"> |
29 | <span i18n>Created by {{ videoChannel.ownerBy }}</span> | 29 | <span class="d-inline-flex"><span i18n class="d-none d-sm-block mr-1">Created by</span>{{ videoChannel.ownerBy }}</span> |
30 | <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" /> | 30 | <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" /> |
31 | </a> | 31 | </a> |
32 | </div> | 32 | </div> |
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' | |||
10 | import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' | 10 | import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' |
11 | import { I18n } from '@ngx-translate/i18n-polyfill' | 11 | import { I18n } from '@ngx-translate/i18n-polyfill' |
12 | import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' | 12 | import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' |
13 | import { ScreenService } from '@app/shared/misc/screen.service' | ||
13 | 14 | ||
14 | @Component({ | 15 | @Component({ |
15 | templateUrl: './video-channels.component.html', | 16 | templateUrl: './video-channels.component.html', |
@@ -32,7 +33,8 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { | |||
32 | private authService: AuthService, | 33 | private authService: AuthService, |
33 | private videoChannelService: VideoChannelService, | 34 | private videoChannelService: VideoChannelService, |
34 | private restExtractor: RestExtractor, | 35 | private restExtractor: RestExtractor, |
35 | private hotkeysService: HotkeysService | 36 | private hotkeysService: HotkeysService, |
37 | private screenService: ScreenService | ||
36 | ) { } | 38 | ) { } |
37 | 39 | ||
38 | ngOnInit () { | 40 | ngOnInit () { |
@@ -79,6 +81,10 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { | |||
79 | if (this.isUserLoggedIn()) this.hotkeysService.remove(this.hotkeys) | 81 | if (this.isUserLoggedIn()) this.hotkeysService.remove(this.hotkeys) |
80 | } | 82 | } |
81 | 83 | ||
84 | get isInSmallView () { | ||
85 | return this.screenService.isInSmallView() | ||
86 | } | ||
87 | |||
82 | isUserLoggedIn () { | 88 | isUserLoggedIn () { |
83 | return this.authService.isLoggedIn() | 89 | return this.authService.isLoggedIn() |
84 | } | 90 | } |