Optimize channel with video in homepage
This commit is contained in:
parent
2cc276f92f
commit
e960932517
|
@ -23,6 +23,6 @@
|
||||||
<div class="video" *ngIf="video && displayLatestVideo">
|
<div class="video" *ngIf="video && displayLatestVideo">
|
||||||
<div i18n class="video-label">Latest published video</div>
|
<div i18n class="video-label">Latest published video</div>
|
||||||
|
|
||||||
<my-video-miniature-markup [uuid]="video.uuid" [onlyDisplayTitle]="true"></my-video-miniature-markup>
|
<my-video-miniature-markup [video]="video" [onlyDisplayTitle]="true"></my-video-miniature-markup>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { finalize, map, switchMap, tap } from 'rxjs/operators'
|
||||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
||||||
import { MarkdownService, Notifier, UserService } from '@app/core'
|
import { MarkdownService, Notifier, UserService } from '@app/core'
|
||||||
import { FindInBulkService } from '@app/shared/shared-search'
|
import { FindInBulkService } from '@app/shared/shared-search'
|
||||||
import { Video, VideoSortField } from '@shared/models/videos'
|
import { VideoSortField } from '@shared/models'
|
||||||
import { VideoChannel, VideoService } from '../../shared-main'
|
import { Video, VideoChannel, VideoService } from '../../shared-main'
|
||||||
import { CustomMarkupComponent } from './shared'
|
import { CustomMarkupComponent } from './shared'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,11 +18,10 @@ import { CustomMarkupComponent } from './shared'
|
||||||
export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit {
|
export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit {
|
||||||
@Input() uuid: string
|
@Input() uuid: string
|
||||||
@Input() onlyDisplayTitle: boolean
|
@Input() onlyDisplayTitle: boolean
|
||||||
|
@Input() video: Video
|
||||||
|
|
||||||
@Output() loaded = new EventEmitter<boolean>()
|
@Output() loaded = new EventEmitter<boolean>()
|
||||||
|
|
||||||
video: Video
|
|
||||||
|
|
||||||
displayOptions: MiniatureDisplayOptions = {
|
displayOptions: MiniatureDisplayOptions = {
|
||||||
date: true,
|
date: true,
|
||||||
views: true,
|
views: true,
|
||||||
|
@ -51,6 +50,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.video) return
|
||||||
|
|
||||||
this.findInBulk.getVideo(this.uuid)
|
this.findInBulk.getVideo(this.uuid)
|
||||||
.pipe(finalize(() => this.loaded.emit(true)))
|
.pipe(finalize(() => this.loaded.emit(true)))
|
||||||
.subscribe({
|
.subscribe({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user