aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/recommendations/recommended-videos.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2019-12-21 09:25:02 +0100
committerRigel Kent <sendmemail@rigelk.eu>2019-12-21 09:25:02 +0100
commit5def76ebba937594c77070dba14aff8f168ced24 (patch)
tree79371616329666272936a151d2c27eccd9f5d35b /client/src/app/videos/recommendations/recommended-videos.component.ts
parent3921166d78540a08d329793c9c2f952135c6fd67 (diff)
downloadPeerTube-5def76ebba937594c77070dba14aff8f168ced24.tar.gz
PeerTube-5def76ebba937594c77070dba14aff8f168ced24.tar.zst
PeerTube-5def76ebba937594c77070dba14aff8f168ced24.zip
Add autoplay tooltip, use of flex-wrap in video-info and other-videos
Diffstat (limited to 'client/src/app/videos/recommendations/recommended-videos.component.ts')
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts
index 116b0e8f7..ada6d3433 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.ts
+++ b/client/src/app/videos/recommendations/recommended-videos.component.ts
@@ -8,6 +8,7 @@ import { User } from '@app/shared'
8import { AuthService, Notifier } from '@app/core' 8import { AuthService, Notifier } from '@app/core'
9import { UserService } from '@app/shared/users/user.service' 9import { UserService } from '@app/shared/users/user.service'
10import { peertubeSessionStorage } from '@app/shared/misc/peertube-web-storage' 10import { peertubeSessionStorage } from '@app/shared/misc/peertube-web-storage'
11import { I18n } from '@ngx-translate/i18n-polyfill'
11 12
12@Component({ 13@Component({
13 selector: 'my-recommended-videos', 14 selector: 'my-recommended-videos',
@@ -23,6 +24,7 @@ export class RecommendedVideosComponent implements OnChanges {
23 @Output() gotRecommendations = new EventEmitter<Video[]>() 24 @Output() gotRecommendations = new EventEmitter<Video[]>()
24 25
25 autoPlayNextVideo: boolean 26 autoPlayNextVideo: boolean
27 autoPlayNextVideoTooltip: string
26 28
27 readonly hasVideos$: Observable<boolean> 29 readonly hasVideos$: Observable<boolean>
28 readonly videos$: Observable<Video[]> 30 readonly videos$: Observable<Video[]>
@@ -31,6 +33,7 @@ export class RecommendedVideosComponent implements OnChanges {
31 private userService: UserService, 33 private userService: UserService,
32 private authService: AuthService, 34 private authService: AuthService,
33 private notifier: Notifier, 35 private notifier: Notifier,
36 private i18n: I18n,
34 private store: RecommendedVideosStore 37 private store: RecommendedVideosStore
35 ) { 38 ) {
36 this.videos$ = this.store.recommendations$ 39 this.videos$ = this.store.recommendations$
@@ -40,6 +43,8 @@ export class RecommendedVideosComponent implements OnChanges {
40 this.autoPlayNextVideo = this.authService.isLoggedIn() 43 this.autoPlayNextVideo = this.authService.isLoggedIn()
41 ? this.authService.getUser().autoPlayNextVideo 44 ? this.authService.getUser().autoPlayNextVideo
42 : peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' || false 45 : peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' || false
46
47 this.autoPlayNextVideoTooltip = this.i18n('When active, the next video is automatically played after the current one.')
43 } 48 }
44 49
45 public ngOnChanges (): void { 50 public ngOnChanges (): void {