diff options
5 files changed, 29 insertions, 11 deletions
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.ts index 1e7860750..df7cc95a7 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 @@ | |||
1 | import { from } from 'rxjs' | 1 | import { from } from 'rxjs' |
2 | import { finalize, map, switchMap, tap } from 'rxjs/operators' | 2 | import { finalize, map, switchMap, tap } from 'rxjs/operators' |
3 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 3 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
4 | import { MarkdownService, Notifier, UserService } from '@app/core' | 4 | import { MarkdownService, Notifier, UserService } from '@app/core' |
5 | import { FindInBulkService } from '@app/shared/shared-search' | 5 | import { FindInBulkService } from '@app/shared/shared-search' |
6 | import { VideoSortField } from '@shared/models' | 6 | import { VideoSortField } from '@shared/models' |
@@ -34,7 +34,8 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O | |||
34 | private findInBulk: FindInBulkService, | 34 | private findInBulk: FindInBulkService, |
35 | private videoService: VideoService, | 35 | private videoService: VideoService, |
36 | private userService: UserService, | 36 | private userService: UserService, |
37 | private notifier: Notifier | 37 | private notifier: Notifier, |
38 | private cd: ChangeDetectorRef | ||
38 | ) { } | 39 | ) { } |
39 | 40 | ||
40 | ngOnInit () { | 41 | ngOnInit () { |
@@ -57,6 +58,8 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O | |||
57 | next: ({ total, data }) => { | 58 | next: ({ total, data }) => { |
58 | this.totalVideos = total | 59 | this.totalVideos = total |
59 | this.video = data[0] | 60 | this.video = data[0] |
61 | |||
62 | this.cd.markForCheck() | ||
60 | }, | 63 | }, |
61 | 64 | ||
62 | error: err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`) | 65 | 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.ts index ab52e7e37..d2cf1326e 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 @@ | |||
1 | import { finalize } from 'rxjs/operators' | 1 | import { finalize } from 'rxjs/operators' |
2 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { Notifier } from '@app/core' | 3 | import { Notifier } from '@app/core' |
4 | import { FindInBulkService } from '@app/shared/shared-search' | 4 | import { FindInBulkService } from '@app/shared/shared-search' |
5 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' | 5 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' |
@@ -36,14 +36,18 @@ export class PlaylistMiniatureMarkupComponent implements CustomMarkupComponent, | |||
36 | 36 | ||
37 | constructor ( | 37 | constructor ( |
38 | private findInBulkService: FindInBulkService, | 38 | private findInBulkService: FindInBulkService, |
39 | private notifier: Notifier | 39 | private notifier: Notifier, |
40 | private cd: ChangeDetectorRef | ||
40 | ) { } | 41 | ) { } |
41 | 42 | ||
42 | ngOnInit () { | 43 | ngOnInit () { |
43 | this.findInBulkService.getPlaylist(this.uuid) | 44 | this.findInBulkService.getPlaylist(this.uuid) |
44 | .pipe(finalize(() => this.loaded.emit(true))) | 45 | .pipe(finalize(() => this.loaded.emit(true))) |
45 | .subscribe({ | 46 | .subscribe({ |
46 | next: playlist => this.playlist = playlist, | 47 | next: playlist => { |
48 | this.playlist = playlist | ||
49 | this.cd.markForCheck() | ||
50 | }, | ||
47 | 51 | ||
48 | error: err => this.notifier.error($localize`Error in playlist miniature component: ${err.message}`) | 52 | error: err => this.notifier.error($localize`Error in playlist miniature component: ${err.message}`) |
49 | }) | 53 | }) |
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.ts index c37666359..21774b7aa 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 @@ | |||
1 | import { finalize } from 'rxjs/operators' | 1 | import { finalize } from 'rxjs/operators' |
2 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { FindInBulkService } from '@app/shared/shared-search' | 4 | import { FindInBulkService } from '@app/shared/shared-search' |
5 | import { Video } from '../../shared-main' | 5 | import { Video } from '../../shared-main' |
@@ -37,7 +37,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI | |||
37 | constructor ( | 37 | constructor ( |
38 | private auth: AuthService, | 38 | private auth: AuthService, |
39 | private findInBulk: FindInBulkService, | 39 | private findInBulk: FindInBulkService, |
40 | private notifier: Notifier | 40 | private notifier: Notifier, |
41 | private cd: ChangeDetectorRef | ||
41 | ) { } | 42 | ) { } |
42 | 43 | ||
43 | getUser () { | 44 | getUser () { |
@@ -56,7 +57,10 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI | |||
56 | this.findInBulk.getVideo(this.uuid) | 57 | this.findInBulk.getVideo(this.uuid) |
57 | .pipe(finalize(() => this.loaded.emit(true))) | 58 | .pipe(finalize(() => this.loaded.emit(true))) |
58 | .subscribe({ | 59 | .subscribe({ |
59 | next: video => this.video = video, | 60 | next: video => { |
61 | this.video = video | ||
62 | this.cd.markForCheck() | ||
63 | }, | ||
60 | 64 | ||
61 | error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`) | 65 | error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`) |
62 | }) | 66 | }) |
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.ts index 70e88ea51..7c2e7db6a 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 @@ | |||
1 | import { finalize } from 'rxjs/operators' | 1 | import { finalize } from 'rxjs/operators' |
2 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { VideoSortField } from '@shared/models' | 4 | import { VideoSortField } from '@shared/models' |
5 | import { Video, VideoService } from '../../shared-main' | 5 | import { Video, VideoService } from '../../shared-main' |
@@ -46,7 +46,8 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit | |||
46 | constructor ( | 46 | constructor ( |
47 | private auth: AuthService, | 47 | private auth: AuthService, |
48 | private videoService: VideoService, | 48 | private videoService: VideoService, |
49 | private notifier: Notifier | 49 | private notifier: Notifier, |
50 | private cd: ChangeDetectorRef | ||
50 | ) { } | 51 | ) { } |
51 | 52 | ||
52 | getUser () { | 53 | getUser () { |
@@ -73,7 +74,10 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit | |||
73 | return this.getVideosObservable() | 74 | return this.getVideosObservable() |
74 | .pipe(finalize(() => this.loaded.emit(true))) | 75 | .pipe(finalize(() => this.loaded.emit(true))) |
75 | .subscribe({ | 76 | .subscribe({ |
76 | next: ({ data }) => this.videos = data, | 77 | next: ({ data }) => { |
78 | this.videos = data | ||
79 | this.cd.markForCheck() | ||
80 | }, | ||
77 | 81 | ||
78 | error: err => this.notifier.error($localize`Error in videos list component: ${err.message}`) | 82 | error: err => this.notifier.error($localize`Error in videos list component: ${err.message}`) |
79 | }) | 83 | }) |
diff --git a/config/dev.yaml b/config/dev.yaml index 44856fb6a..f570ede1e 100644 --- a/config/dev.yaml +++ b/config/dev.yaml | |||
@@ -9,6 +9,9 @@ secrets: | |||
9 | peertube: 'my super dev secret' | 9 | peertube: 'my super dev secret' |
10 | 10 | ||
11 | rates_limit: | 11 | rates_limit: |
12 | api: | ||
13 | window: 10 seconds | ||
14 | max: 500 | ||
12 | signup: | 15 | signup: |
13 | window: 5 minutes | 16 | window: 5 minutes |
14 | max: 200 | 17 | max: 200 |