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/+accounts | |
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/+accounts')
-rw-r--r-- | client/src/app/+accounts/accounts.component.html | 2 | ||||
-rw-r--r-- | client/src/app/+accounts/accounts.component.ts | 6 |
2 files changed, 7 insertions, 1 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 @@ | |||
32 | </div> | 32 | </div> |
33 | 33 | ||
34 | <div class="right-buttons"> | 34 | <div class="right-buttons"> |
35 | <a *ngIf="isAccountManageable" routerLink="/my-account" class="btn btn-outline-tertiary mr-2" i18n>Manage</a> | 35 | <a *ngIf="isAccountManageable && !isInSmallView" routerLink="/my-account" class="btn btn-outline-tertiary mr-2" i18n>Manage</a> |
36 | <my-subscribe-button *ngIf="videoChannels" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button> | 36 | <my-subscribe-button *ngIf="videoChannels" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
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' | |||
11 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 11 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
12 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 12 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
13 | import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' | 13 | import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' |
14 | import { ScreenService } from '@app/shared/misc/screen.service' | ||
14 | 15 | ||
15 | @Component({ | 16 | @Component({ |
16 | templateUrl: './accounts.component.html', | 17 | templateUrl: './accounts.component.html', |
@@ -36,6 +37,7 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
36 | private restExtractor: RestExtractor, | 37 | private restExtractor: RestExtractor, |
37 | private redirectService: RedirectService, | 38 | private redirectService: RedirectService, |
38 | private authService: AuthService, | 39 | private authService: AuthService, |
40 | private screenService: ScreenService, | ||
39 | private i18n: I18n | 41 | private i18n: I18n |
40 | ) { | 42 | ) { |
41 | } | 43 | } |
@@ -91,6 +93,10 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
91 | ) | 93 | ) |
92 | } | 94 | } |
93 | 95 | ||
96 | get isInSmallView () { | ||
97 | return this.screenService.isInSmallView() | ||
98 | } | ||
99 | |||
94 | onUserChanged () { | 100 | onUserChanged () { |
95 | this.getUserIfNeeded(this.account) | 101 | this.getUserIfNeeded(this.account) |
96 | } | 102 | } |