diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-02 10:37:52 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-02 10:37:52 +0100 |
commit | 2666fd7c753c8afdcba1907a5900ccb143df23c4 (patch) | |
tree | 03587b2ddf47e5063680398c5e598aa4a47bdb77 /client/src/app/+videos/+video-watch | |
parent | 657bba2b29715f654264422d868e3e661bbdf895 (diff) | |
download | PeerTube-2666fd7c753c8afdcba1907a5900ccb143df23c4.tar.gz PeerTube-2666fd7c753c8afdcba1907a5900ccb143df23c4.tar.zst PeerTube-2666fd7c753c8afdcba1907a5900ccb143df23c4.zip |
Fix small UI bugs
Diffstat (limited to 'client/src/app/+videos/+video-watch')
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index b698d554f..dff37c034 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -12,6 +12,7 @@ import { | |||
12 | Notifier, | 12 | Notifier, |
13 | PeerTubeSocket, | 13 | PeerTubeSocket, |
14 | RestExtractor, | 14 | RestExtractor, |
15 | ScreenService, | ||
15 | ServerService, | 16 | ServerService, |
16 | UserService | 17 | UserService |
17 | } from '@app/core' | 18 | } from '@app/core' |
@@ -126,14 +127,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
126 | private hotkeysService: HotkeysService, | 127 | private hotkeysService: HotkeysService, |
127 | private hooks: HooksService, | 128 | private hooks: HooksService, |
128 | private peertubeSocket: PeerTubeSocket, | 129 | private peertubeSocket: PeerTubeSocket, |
130 | private screenService: ScreenService, | ||
129 | private location: PlatformLocation, | 131 | private location: PlatformLocation, |
130 | @Inject(LOCALE_ID) private localeId: string | 132 | @Inject(LOCALE_ID) private localeId: string |
131 | ) { | 133 | ) { } |
132 | this.tooltipLike = $localize`Like this video` | ||
133 | this.tooltipDislike = $localize`Dislike this video` | ||
134 | this.tooltipSupport = $localize`Support options for this video` | ||
135 | this.tooltipSaveToPlaylist = $localize`Save to playlist` | ||
136 | } | ||
137 | 134 | ||
138 | get user () { | 135 | get user () { |
139 | return this.authService.getUser() | 136 | return this.authService.getUser() |
@@ -144,6 +141,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
144 | } | 141 | } |
145 | 142 | ||
146 | async ngOnInit () { | 143 | async ngOnInit () { |
144 | // Hide the tooltips for unlogged users in mobile view, this adds confusion with the popover | ||
145 | if (this.user || !this.screenService.isInMobileView()) { | ||
146 | this.tooltipLike = $localize`Like this video` | ||
147 | this.tooltipDislike = $localize`Dislike this video` | ||
148 | this.tooltipSupport = $localize`Support options for this video` | ||
149 | this.tooltipSaveToPlaylist = $localize`Save to playlist` | ||
150 | } | ||
151 | |||
147 | PeertubePlayerManager.initState() | 152 | PeertubePlayerManager.initState() |
148 | 153 | ||
149 | this.serverConfig = this.serverService.getTmpConfig() | 154 | this.serverConfig = this.serverService.getTmpConfig() |