From 5def76ebba937594c77070dba14aff8f168ced24 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sat, 21 Dec 2019 09:25:02 +0100 Subject: Add autoplay tooltip, use of flex-wrap in video-info and other-videos --- .../src/app/videos/recommendations/recommended-videos.component.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/src/app/videos/recommendations/recommended-videos.component.ts') 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' import { AuthService, Notifier } from '@app/core' import { UserService } from '@app/shared/users/user.service' import { peertubeSessionStorage } from '@app/shared/misc/peertube-web-storage' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-recommended-videos', @@ -23,6 +24,7 @@ export class RecommendedVideosComponent implements OnChanges { @Output() gotRecommendations = new EventEmitter() autoPlayNextVideo: boolean + autoPlayNextVideoTooltip: string readonly hasVideos$: Observable readonly videos$: Observable @@ -31,6 +33,7 @@ export class RecommendedVideosComponent implements OnChanges { private userService: UserService, private authService: AuthService, private notifier: Notifier, + private i18n: I18n, private store: RecommendedVideosStore ) { this.videos$ = this.store.recommendations$ @@ -40,6 +43,8 @@ export class RecommendedVideosComponent implements OnChanges { this.autoPlayNextVideo = this.authService.isLoggedIn() ? this.authService.getUser().autoPlayNextVideo : peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' || false + + this.autoPlayNextVideoTooltip = this.i18n('When active, the next video is automatically played after the current one.') } public ngOnChanges (): void { -- cgit v1.2.3