ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix custom markup
Chocobozzz647c2b7d0448
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.tsindex 1e7860750e..df7cc95a7f 100644--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts@@ -1,6 +1,6 @@import { from } from 'rxjs'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 { FindInBulkService } from '@app/shared/shared-search'import { VideoSortField } from '@shared/models'@@ -34,7 +34,8 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, Oprivate findInBulk: FindInBulkService,private videoService: VideoService,private userService: UserService,- private notifier: Notifier+ private notifier: Notifier,+ private cd: ChangeDetectorRef) { }ngOnInit () {@@ -57,6 +58,8 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, Onext: ({ total, data }) => {this.totalVideos = totalthis.video = data[0]++ this.cd.markForCheck()},error: err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`)diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.tsindex ab52e7e37f..d2cf1326ee 100644--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts@@ -1,5 +1,5 @@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 { FindInBulkService } from '@app/shared/shared-search'import { MiniatureDisplayOptions } from '../../shared-video-miniature'@@ -36,14 +36,18 @@ export class PlaylistMiniatureMarkupComponent implements CustomMarkupComponent,constructor (private findInBulkService: FindInBulkService,- private notifier: Notifier+ private notifier: Notifier,+ private cd: ChangeDetectorRef) { }ngOnInit () {this.findInBulkService.getPlaylist(this.uuid).pipe(finalize(() => this.loaded.emit(true))).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}`)})diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.tsindex c376663592..21774b7aad 100644--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts@@ -1,5 +1,5 @@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 { FindInBulkService } from '@app/shared/shared-search'import { Video } from '../../shared-main'@@ -37,7 +37,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnIconstructor (private auth: AuthService,private findInBulk: FindInBulkService,- private notifier: Notifier+ private notifier: Notifier,+ private cd: ChangeDetectorRef) { }getUser () {@@ -56,7 +57,10 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnIthis.findInBulk.getVideo(this.uuid).pipe(finalize(() => this.loaded.emit(true))).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}`)})diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.tsindex 70e88ea51c..7c2e7db6a1 100644--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts@@ -1,5 +1,5 @@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 { VideoSortField } from '@shared/models'import { Video, VideoService } from '../../shared-main'@@ -46,7 +46,8 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInitconstructor (private auth: AuthService,private videoService: VideoService,- private notifier: Notifier+ private notifier: Notifier,+ private cd: ChangeDetectorRef) { }getUser () {@@ -73,7 +74,10 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInitreturn this.getVideosObservable().pipe(finalize(() => this.loaded.emit(true))).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}`)})diff --git a/config/dev.yaml b/config/dev.yamlindex 44856fb6a5..f570ede1e5 100644--- a/config/dev.yaml+++ b/config/dev.yaml@@ -9,6 +9,9 @@ secrets:peertube: 'my super dev secret'rates_limit:+ api:+ window: 10 seconds+ max: 500signup:window: 5 minutesmax: 200