diff options
Diffstat (limited to 'client/src/app/videos/recommendations/recommended-videos.component.ts')
-rw-r--r-- | client/src/app/videos/recommendations/recommended-videos.component.ts | 5 |
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' | |||
8 | import { AuthService, Notifier } from '@app/core' | 8 | import { AuthService, Notifier } from '@app/core' |
9 | import { UserService } from '@app/shared/users/user.service' | 9 | import { UserService } from '@app/shared/users/user.service' |
10 | import { peertubeSessionStorage } from '@app/shared/misc/peertube-web-storage' | 10 | import { peertubeSessionStorage } from '@app/shared/misc/peertube-web-storage' |
11 | import { 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 { |