mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-05-02 21:18:43 +00:00
Fix custom markup
This commit is contained in:
parent
d5ae943da9
commit
647c2b7d04
|
@ -1,6 +1,6 @@
|
||||||
import { from } from 'rxjs'
|
import { from } from 'rxjs'
|
||||||
import { finalize, map, switchMap, tap } from 'rxjs/operators'
|
import { finalize, map, switchMap, tap } from 'rxjs/operators'
|
||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
import { ChangeDetectionStrategy, ChangeDetectorRef, 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 { VideoSortField } from '@shared/models'
|
import { VideoSortField } from '@shared/models'
|
||||||
|
@ -34,7 +34,8 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O
|
||||||
private findInBulk: FindInBulkService,
|
private findInBulk: FindInBulkService,
|
||||||
private videoService: VideoService,
|
private videoService: VideoService,
|
||||||
private userService: UserService,
|
private userService: UserService,
|
||||||
private notifier: Notifier
|
private notifier: Notifier,
|
||||||
|
private cd: ChangeDetectorRef
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
|
@ -57,6 +58,8 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O
|
||||||
next: ({ total, data }) => {
|
next: ({ total, data }) => {
|
||||||
this.totalVideos = total
|
this.totalVideos = total
|
||||||
this.video = data[0]
|
this.video = data[0]
|
||||||
|
|
||||||
|
this.cd.markForCheck()
|
||||||
},
|
},
|
||||||
|
|
||||||
error: err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`)
|
error: err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { finalize } from 'rxjs/operators'
|
import { finalize } from 'rxjs/operators'
|
||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
||||||
import { Notifier } from '@app/core'
|
import { Notifier } from '@app/core'
|
||||||
import { FindInBulkService } from '@app/shared/shared-search'
|
import { FindInBulkService } from '@app/shared/shared-search'
|
||||||
import { MiniatureDisplayOptions } from '../../shared-video-miniature'
|
import { MiniatureDisplayOptions } from '../../shared-video-miniature'
|
||||||
|
@ -36,14 +36,18 @@ export class PlaylistMiniatureMarkupComponent implements CustomMarkupComponent,
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private findInBulkService: FindInBulkService,
|
private findInBulkService: FindInBulkService,
|
||||||
private notifier: Notifier
|
private notifier: Notifier,
|
||||||
|
private cd: ChangeDetectorRef
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
this.findInBulkService.getPlaylist(this.uuid)
|
this.findInBulkService.getPlaylist(this.uuid)
|
||||||
.pipe(finalize(() => this.loaded.emit(true)))
|
.pipe(finalize(() => this.loaded.emit(true)))
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: playlist => this.playlist = playlist,
|
next: playlist => {
|
||||||
|
this.playlist = playlist
|
||||||
|
this.cd.markForCheck()
|
||||||
|
},
|
||||||
|
|
||||||
error: err => this.notifier.error($localize`Error in playlist miniature component: ${err.message}`)
|
error: err => this.notifier.error($localize`Error in playlist miniature component: ${err.message}`)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { finalize } from 'rxjs/operators'
|
import { finalize } from 'rxjs/operators'
|
||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
||||||
import { AuthService, Notifier } from '@app/core'
|
import { AuthService, Notifier } from '@app/core'
|
||||||
import { FindInBulkService } from '@app/shared/shared-search'
|
import { FindInBulkService } from '@app/shared/shared-search'
|
||||||
import { Video } from '../../shared-main'
|
import { Video } from '../../shared-main'
|
||||||
|
@ -37,7 +37,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
|
||||||
constructor (
|
constructor (
|
||||||
private auth: AuthService,
|
private auth: AuthService,
|
||||||
private findInBulk: FindInBulkService,
|
private findInBulk: FindInBulkService,
|
||||||
private notifier: Notifier
|
private notifier: Notifier,
|
||||||
|
private cd: ChangeDetectorRef
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
getUser () {
|
getUser () {
|
||||||
|
@ -56,7 +57,10 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
|
||||||
this.findInBulk.getVideo(this.uuid)
|
this.findInBulk.getVideo(this.uuid)
|
||||||
.pipe(finalize(() => this.loaded.emit(true)))
|
.pipe(finalize(() => this.loaded.emit(true)))
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: video => this.video = video,
|
next: video => {
|
||||||
|
this.video = video
|
||||||
|
this.cd.markForCheck()
|
||||||
|
},
|
||||||
|
|
||||||
error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`)
|
error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { finalize } from 'rxjs/operators'
|
import { finalize } from 'rxjs/operators'
|
||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
||||||
import { AuthService, Notifier } from '@app/core'
|
import { AuthService, Notifier } from '@app/core'
|
||||||
import { VideoSortField } from '@shared/models'
|
import { VideoSortField } from '@shared/models'
|
||||||
import { Video, VideoService } from '../../shared-main'
|
import { Video, VideoService } from '../../shared-main'
|
||||||
|
@ -46,7 +46,8 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit
|
||||||
constructor (
|
constructor (
|
||||||
private auth: AuthService,
|
private auth: AuthService,
|
||||||
private videoService: VideoService,
|
private videoService: VideoService,
|
||||||
private notifier: Notifier
|
private notifier: Notifier,
|
||||||
|
private cd: ChangeDetectorRef
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
getUser () {
|
getUser () {
|
||||||
|
@ -73,7 +74,10 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit
|
||||||
return this.getVideosObservable()
|
return this.getVideosObservable()
|
||||||
.pipe(finalize(() => this.loaded.emit(true)))
|
.pipe(finalize(() => this.loaded.emit(true)))
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: ({ data }) => this.videos = data,
|
next: ({ data }) => {
|
||||||
|
this.videos = data
|
||||||
|
this.cd.markForCheck()
|
||||||
|
},
|
||||||
|
|
||||||
error: err => this.notifier.error($localize`Error in videos list component: ${err.message}`)
|
error: err => this.notifier.error($localize`Error in videos list component: ${err.message}`)
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,6 +9,9 @@ secrets:
|
||||||
peertube: 'my super dev secret'
|
peertube: 'my super dev secret'
|
||||||
|
|
||||||
rates_limit:
|
rates_limit:
|
||||||
|
api:
|
||||||
|
window: 10 seconds
|
||||||
|
max: 500
|
||||||
signup:
|
signup:
|
||||||
window: 5 minutes
|
window: 5 minutes
|
||||||
max: 200
|
max: 200
|
||||||
|
|
Loading…
Reference in a new issue