aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/shared/shared-custom-markup
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
Diffstat (limited to 'client/src/app/shared/shared-custom-markup')
-rw-r--r--client/src/app/shared/shared-custom-markup/custom-markup.service.ts4
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts8
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts8
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts8
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts8
5 files changed, 18 insertions, 18 deletions
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
index c9d33980e..63f2f76f5 100644
--- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
+++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
@@ -1,4 +1,4 @@
1import { first } from 'rxjs/operators' 1import { firstValueFrom } from 'rxjs'
2import { ComponentRef, Injectable } from '@angular/core' 2import { ComponentRef, Injectable } from '@angular/core'
3import { MarkdownService } from '@app/core' 3import { MarkdownService } from '@app/core'
4import { 4import {
@@ -85,7 +85,7 @@ export class CustomMarkupService {
85 const component = this.execAngularBuilder(selector, e) 85 const component = this.execAngularBuilder(selector, e)
86 86
87 if (component.instance.loaded) { 87 if (component.instance.loaded) {
88 const p = component.instance.loaded.pipe(first()).toPromise() 88 const p = firstValueFrom(component.instance.loaded)
89 loadedPromises.push(p) 89 loadedPromises.push(p)
90 } 90 }
91 91
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 5bb045a82..8c1357d7a 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
@@ -44,14 +44,14 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O
44 tap(html => this.descriptionHTML = html), 44 tap(html => this.descriptionHTML = html),
45 switchMap(() => this.loadVideosObservable()), 45 switchMap(() => this.loadVideosObservable()),
46 finalize(() => this.loaded.emit(true)) 46 finalize(() => this.loaded.emit(true))
47 ).subscribe( 47 ).subscribe({
48 ({ total, data }) => { 48 next: ({ total, data }) => {
49 this.totalVideos = total 49 this.totalVideos = total
50 this.video = data[0] 50 this.video = data[0]
51 }, 51 },
52 52
53 err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`) 53 error: err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`)
54 ) 54 })
55 } 55 }
56 56
57 getVideoChannelLink () { 57 getVideoChannelLink () {
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 5a5c34867..07fa6fd2d 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
@@ -41,10 +41,10 @@ export class PlaylistMiniatureMarkupComponent implements CustomMarkupComponent,
41 ngOnInit () { 41 ngOnInit () {
42 this.findInBulkService.getPlaylist(this.uuid) 42 this.findInBulkService.getPlaylist(this.uuid)
43 .pipe(finalize(() => this.loaded.emit(true))) 43 .pipe(finalize(() => this.loaded.emit(true)))
44 .subscribe( 44 .subscribe({
45 playlist => this.playlist = playlist, 45 next: playlist => this.playlist = playlist,
46 46
47 err => this.notifier.error($localize`Error in playlist miniature component: ${err.message}`) 47 error: err => this.notifier.error($localize`Error in playlist miniature component: ${err.message}`)
48 ) 48 })
49 } 49 }
50} 50}
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 84c936ee7..56b43d85e 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
@@ -53,10 +53,10 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
53 53
54 this.findInBulk.getVideo(this.uuid) 54 this.findInBulk.getVideo(this.uuid)
55 .pipe(finalize(() => this.loaded.emit(true))) 55 .pipe(finalize(() => this.loaded.emit(true)))
56 .subscribe( 56 .subscribe({
57 video => this.video = video, 57 next: video => this.video = video,
58 58
59 err => this.notifier.error($localize`Error in video miniature component: ${err.message}`) 59 error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`)
60 ) 60 })
61 } 61 }
62} 62}
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 6473e9ba0..856e43681 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
@@ -71,11 +71,11 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit
71 71
72 return this.getVideosObservable() 72 return this.getVideosObservable()
73 .pipe(finalize(() => this.loaded.emit(true))) 73 .pipe(finalize(() => this.loaded.emit(true)))
74 .subscribe( 74 .subscribe({
75 ({ data }) => this.videos = data, 75 next: ({ data }) => this.videos = data,
76 76
77 err => this.notifier.error($localize`Error in videos list component: ${err.message}`) 77 error: err => this.notifier.error($localize`Error in videos list component: ${err.message}`)
78 ) 78 })
79 } 79 }
80 80
81 getVideosObservable () { 81 getVideosObservable () {