X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-thumbnail%2Fvideo-thumbnail.component.ts;h=bdede17a3d448bc13651b28cdbd6fc1a9b95754c;hb=4024c44f9027a32809931de0692d40d001df721c;hp=812c7a50880110dbdcf02533c88781e0befcec4c;hpb=0bdad52fbbad81e7654adc495088da56a00437df;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts index 812c7a508..bdede17a3 100644 --- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts +++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' import { ScreenService } from '@app/core' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { VideoState } from '@shared/models' import { Video } from '../shared-main' @Component({ @@ -25,12 +25,15 @@ export class VideoThumbnailComponent { addToWatchLaterText: string addedToWatchLaterText: string - constructor ( - private screenService: ScreenService, - private i18n: I18n - ) { - this.addToWatchLaterText = this.i18n('Add to watch later') - this.addedToWatchLaterText = this.i18n('Remove from watch later') + constructor (private screenService: ScreenService) { + this.addToWatchLaterText = $localize`Add to watch later` + this.addedToWatchLaterText = $localize`Remove from watch later` + } + + isLiveEnded () { + if (!this.video.state) return + + return this.video.state.id === VideoState.LIVE_ENDED } getImageUrl () {