aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-30 08:55:11 +0200
committerChocobozzz <me@florianbigard.com>2021-06-30 08:56:14 +0200
commit2453589a286e1f65843af582512387b2fa17b502 (patch)
tree57d41d8c432ca4e793a16d3b51f665b34aafec52 /client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
parentd4f0b2ecec221b6cdd75b5d87ba800c6301a15df (diff)
downloadPeerTube-2453589a286e1f65843af582512387b2fa17b502.tar.gz
PeerTube-2453589a286e1f65843af582512387b2fa17b502.tar.zst
PeerTube-2453589a286e1f65843af582512387b2fa17b502.zip
Move video alert in a dedicated component
Diffstat (limited to 'client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts')
-rw-r--r--client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts32
1 files changed, 32 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
new file mode 100644
index 000000000..8a46ba0d5
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
@@ -0,0 +1,32 @@
1import { Component, Input } from '@angular/core'
2import { VideoDetails } from '@app/shared/shared-main'
3import { VideoState } from '@shared/models'
4
5@Component({
6 selector: 'my-video-alert',
7 templateUrl: './video-alert.component.html',
8 styleUrls: [ './video-alert.component.scss' ]
9})
10export class VideoAlertComponent {
11 @Input() video: VideoDetails
12
13 isVideoToTranscode () {
14 return this.video && this.video.state.id === VideoState.TO_TRANSCODE
15 }
16
17 isVideoToImport () {
18 return this.video && this.video.state.id === VideoState.TO_IMPORT
19 }
20
21 hasVideoScheduledPublication () {
22 return this.video && this.video.scheduledUpdate !== undefined
23 }
24
25 isWaitingForLive () {
26 return this.video?.state.id === VideoState.WAITING_FOR_LIVE
27 }
28
29 isLiveEnded () {
30 return this.video?.state.id === VideoState.LIVE_ENDED
31 }
32}