aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-thumbnail
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-13 14:36:30 +0100
committerChocobozzz <me@florianbigard.com>2020-11-13 14:36:30 +0100
commit5c0904fc664e3eb04ac75a9430c1297c2a14f853 (patch)
tree6ede3183976686f113aca6c06ba36b99cfe965f4 /client/src/app/shared/shared-thumbnail
parent786b855af726599a9c877eefa6fa8508c36e1aca (diff)
downloadPeerTube-5c0904fc664e3eb04ac75a9430c1297c2a14f853.tar.gz
PeerTube-5c0904fc664e3eb04ac75a9430c1297c2a14f853.tar.zst
PeerTube-5c0904fc664e3eb04ac75a9430c1297c2a14f853.zip
Cleanup lives on server restart
Diffstat (limited to 'client/src/app/shared/shared-thumbnail')
-rw-r--r--client/src/app/shared/shared-thumbnail/video-thumbnail.component.html5
-rw-r--r--client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss7
-rw-r--r--client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts5
3 files changed, 14 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html
index be07844ab..4fea0cc1c 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html
@@ -27,7 +27,10 @@
27 <div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div> 27 <div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div>
28 28
29 <div class="video-thumbnail-duration-overlay" *ngIf="!video.isLive">{{ video.durationLabel }}</div> 29 <div class="video-thumbnail-duration-overlay" *ngIf="!video.isLive">{{ video.durationLabel }}</div>
30 <div i18n class="video-thumbnail-live-overlay" *ngIf="video.isLive">LIVE</div> 30 <div class="video-thumbnail-live-overlay" [ngClass]="{ 'live-ended': isLiveEnded() }" *ngIf="video.isLive">
31 <ng-container i18n *ngIf="!isLiveEnded()">LIVE</ng-container>
32 <ng-container i18n *ngIf="isLiveEnded()">LIVE ENDED</ng-container>
33 </div>
31 34
32 <div class="play-overlay"> 35 <div class="play-overlay">
33 <div class="icon"></div> 36 <div class="icon"></div>
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss
index 1b6151c89..4f53ffaf6 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss
@@ -51,9 +51,12 @@
51 } 51 }
52 52
53 .video-thumbnail-live-overlay { 53 .video-thumbnail-live-overlay {
54 background-color: rgba(224, 8, 8, 0.7);
55 color: #fff;
56 font-weight: $font-semibold; 54 font-weight: $font-semibold;
55 color: #fff;
56
57 &:not(.live-ended) {
58 background-color: rgba(224, 8, 8, 0.7);
59 }
57 } 60 }
58 61
59 .video-thumbnail-actions-overlay { 62 .video-thumbnail-actions-overlay {
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 b2a2cf240..67a9b0028 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
@@ -1,5 +1,6 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core' 1import { Component, EventEmitter, Input, Output } from '@angular/core'
2import { ScreenService } from '@app/core' 2import { ScreenService } from '@app/core'
3import { VideoState } from '@shared/models'
3import { Video } from '../shared-main' 4import { Video } from '../shared-main'
4 5
5@Component({ 6@Component({
@@ -29,6 +30,10 @@ export class VideoThumbnailComponent {
29 this.addedToWatchLaterText = $localize`Remove from watch later` 30 this.addedToWatchLaterText = $localize`Remove from watch later`
30 } 31 }
31 32
33 isLiveEnded () {
34 return this.video.state.id === VideoState.LIVE_ENDED
35 }
36
32 getImageUrl () { 37 getImageUrl () {
33 if (!this.video) return '' 38 if (!this.video) return ''
34 39