export * from './privacy-concerns.component'
+export * from './video-alert.component'
--- /dev/null
+<div i18n class="alert alert-warning" *ngIf="isVideoToImport()">
+ The video is being imported, it will be available when the import is finished.
+</div>
+
+<div i18n class="alert alert-warning" *ngIf="isVideoToTranscode()">
+ The video is being transcoded, it may not work properly.
+</div>
+
+<div i18n class="alert alert-info" *ngIf="hasVideoScheduledPublication()">
+ This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
+</div>
+
+<div i18n class="alert alert-info" *ngIf="isWaitingForLive()">
+ This live has not started yet.
+</div>
+
+<div i18n class="alert alert-info" *ngIf="isLiveEnded()">
+ This live has ended.
+</div>
+
+<div class="alert alert-danger" *ngIf="video?.blacklisted">
+ <div class="blocked-label" i18n>This video is blocked.</div>
+ {{ video.blockedReason }}
+</div>
--- /dev/null
+.alert {
+ text-align: center;
+ border-radius: 0;
+}
--- /dev/null
+import { Component, Input } from '@angular/core'
+import { VideoDetails } from '@app/shared/shared-main'
+import { VideoState } from '@shared/models'
+
+@Component({
+ selector: 'my-video-alert',
+ templateUrl: './video-alert.component.html',
+ styleUrls: [ './video-alert.component.scss' ]
+})
+export class VideoAlertComponent {
+ @Input() video: VideoDetails
+
+ isVideoToTranscode () {
+ return this.video && this.video.state.id === VideoState.TO_TRANSCODE
+ }
+
+ isVideoToImport () {
+ return this.video && this.video.state.id === VideoState.TO_IMPORT
+ }
+
+ hasVideoScheduledPublication () {
+ return this.video && this.video.scheduledUpdate !== undefined
+ }
+
+ isWaitingForLive () {
+ return this.video?.state.id === VideoState.WAITING_FOR_LIVE
+ }
+
+ isLiveEnded () {
+ return this.video?.state.id === VideoState.LIVE_ENDED
+ }
+}
<my-plugin-placeholder pluginId="player-next"></my-plugin-placeholder>
</div>
- <div class="row">
- <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToImport()">
- The video is being imported, it will be available when the import is finished.
- </div>
-
- <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToTranscode()">
- The video is being transcoded, it may not work properly.
- </div>
-
- <div i18n class="col-md-12 alert alert-info" *ngIf="hasVideoScheduledPublication()">
- This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
- </div>
-
- <div i18n class="col-md-12 alert alert-info" *ngIf="isWaitingForLive()">
- This live has not started yet.
- </div>
-
- <div i18n class="col-md-12 alert alert-info" *ngIf="isLiveEnded()">
- This live has ended.
- </div>
-
- <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
- <div class="blocked-label" i18n>This video is blocked.</div>
- {{ video.blockedReason }}
- </div>
- </div>
+ <my-video-alert [video]="video"></my-video-alert>
<!-- Video information -->
<div *ngIf="video" class="margin-content video-bottom">
height: 100%;
}
-.alert {
- text-align: center;
- border-radius: 0;
-}
-
.flex-direction-column {
flex-direction: column;
}
}
}
- isVideoToTranscode () {
- return this.video && this.video.state.id === VideoState.TO_TRANSCODE
- }
-
- isVideoToImport () {
- return this.video && this.video.state.id === VideoState.TO_IMPORT
- }
-
- hasVideoScheduledPublication () {
- return this.video && this.video.scheduledUpdate !== undefined
- }
-
- isWaitingForLive () {
- return this.video?.state.id === VideoState.WAITING_FOR_LIVE
- }
-
- isLiveEnded () {
- return this.video?.state.id === VideoState.LIVE_ENDED
- }
-
isVideoBlur (video: Video) {
return video.isVideoNSFWForUser(this.user, this.serverConfig)
}
import { VideoCommentService } from '../../shared/shared-video-comment/video-comment.service'
import { PlayerStylesComponent } from './player-styles.component'
import {
+ ActionButtonsComponent,
+ PrivacyConcernsComponent,
RecommendationsModule,
+ VideoAlertComponent,
VideoAvatarChannelComponent,
VideoDescriptionComponent,
VideoRateComponent,
- VideoWatchPlaylistComponent,
- ActionButtonsComponent,
- PrivacyConcernsComponent
+ VideoWatchPlaylistComponent
} from './shared'
import { VideoCommentAddComponent } from './shared/comment/video-comment-add.component'
import { VideoCommentComponent } from './shared/comment/video-comment.component'
VideoDescriptionComponent,
PrivacyConcernsComponent,
ActionButtonsComponent,
+ VideoAlertComponent,
VideoCommentsComponent,
VideoCommentAddComponent,