From 5c0904fc664e3eb04ac75a9430c1297c2a14f853 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 13 Nov 2020 14:36:30 +0100 Subject: Cleanup lives on server restart --- .../+video-watch/video-watch.component.html | 22 +++++++++++++++++----- .../video-thumbnail.component.html | 5 ++++- .../video-thumbnail.component.scss | 7 +++++-- .../shared-thumbnail/video-thumbnail.component.ts | 5 +++++ 4 files changed, 31 insertions(+), 8 deletions(-) (limited to 'client') diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html index daee4be2a..9e469f0b0 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.html +++ b/client/src/app/+videos/+video-watch/video-watch.component.html @@ -34,7 +34,7 @@
- This live is finished. + This live has ended.
@@ -51,8 +51,14 @@

{{ video.name }}

-
- Published • {{ video.views | myNumberFormatter }} views +
+ Published + + + • {{ video.views | myNumberFormatter }} + views + viewers +
@@ -62,8 +68,14 @@
-
- Published • {{ video.views | myNumberFormatter }} views +
+ Published + + + • {{ video.views | myNumberFormatter }} + views + viewers +
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 @@
{{ video.durationLabel }}
-
LIVE
+
+ LIVE + LIVE ENDED +
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 @@ } .video-thumbnail-live-overlay { - background-color: rgba(224, 8, 8, 0.7); - color: #fff; font-weight: $font-semibold; + color: #fff; + + &:not(.live-ended) { + background-color: rgba(224, 8, 8, 0.7); + } } .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 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' import { ScreenService } from '@app/core' +import { VideoState } from '@shared/models' import { Video } from '../shared-main' @Component({ @@ -29,6 +30,10 @@ export class VideoThumbnailComponent { this.addedToWatchLaterText = $localize`Remove from watch later` } + isLiveEnded () { + return this.video.state.id === VideoState.LIVE_ENDED + } + getImageUrl () { if (!this.video) return '' -- cgit v1.2.3