aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-library
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 14:42:53 +0200
committerChocobozzz <me@florianbigard.com>2021-08-18 08:35:06 +0200
commit9df52d660feb722404be00a50f3c8a612bec1c15 (patch)
treedde52880fa012874d24c60f64eb596b0a789cc8b /client/src/app/+my-library
parentadb8809d43648ea0a64d6845bb39aa3bd0e005a6 (diff)
downloadPeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.gz
PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.zst
PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.zip
Migrate client to eslint
Diffstat (limited to 'client/src/app/+my-library')
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts4
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts8
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts8
-rw-r--r--client/src/app/+my-library/my-history/my-history.component.ts7
-rw-r--r--client/src/app/+my-library/my-library.component.ts2
-rw-r--r--client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts2
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts6
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts4
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts10
-rw-r--r--client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts6
-rw-r--r--client/src/app/+my-library/my-videos/my-videos.component.ts4
11 files changed, 35 insertions, 26 deletions
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
index d983aacd9..fd00720d8 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
@@ -31,7 +31,7 @@ export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements
31 private notifier: Notifier, 31 private notifier: Notifier,
32 private router: Router, 32 private router: Router,
33 private videoChannelService: VideoChannelService 33 private videoChannelService: VideoChannelService
34 ) { 34 ) {
35 super() 35 super()
36 } 36 }
37 37
@@ -64,7 +64,7 @@ export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements
64 this.authService.refreshUserInformation() 64 this.authService.refreshUserInformation()
65 65
66 this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`) 66 this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`)
67 this.router.navigate(['/my-library', 'video-channels']) 67 this.router.navigate([ '/my-library', 'video-channels' ])
68 }, 68 },
69 69
70 error: err => { 70 error: err => {
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
index e8bfbf9ce..f9521b8b5 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
@@ -66,7 +66,9 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
66 }) 66 })
67 }, 67 },
68 68
69 error: err => this.error = err.message 69 error: err => {
70 this.error = err.message
71 }
70 }) 72 })
71 }) 73 })
72 } 74 }
@@ -96,7 +98,9 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
96 this.router.navigate([ '/my-library', 'video-channels' ]) 98 this.router.navigate([ '/my-library', 'video-channels' ])
97 }, 99 },
98 100
99 error: err => this.error = err.message 101 error: err => {
102 this.error = err.message
103 }
100 }) 104 })
101 } 105 }
102 106
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
index 8b665fd58..303f783fd 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
@@ -121,16 +121,16 @@ channel with the same name (${videoChannel.name})!`,
121 display: false 121 display: false
122 }, 122 },
123 scales: { 123 scales: {
124 xAxes: [{ 124 xAxes: [ {
125 display: false 125 display: false
126 }], 126 } ],
127 yAxes: [{ 127 yAxes: [ {
128 display: false, 128 display: false,
129 ticks: { 129 ticks: {
130 min: Math.max(0, this.videoChannelsMinimumDailyViews - (3 * this.videoChannelsMaximumDailyViews / 100)), 130 min: Math.max(0, this.videoChannelsMinimumDailyViews - (3 * this.videoChannelsMaximumDailyViews / 100)),
131 max: Math.max(1, this.videoChannelsMaximumDailyViews) 131 max: Math.max(1, this.videoChannelsMaximumDailyViews)
132 } 132 }
133 }] 133 } ]
134 }, 134 },
135 layout: { 135 layout: {
136 padding: { 136 padding: {
diff --git a/client/src/app/+my-library/my-history/my-history.component.ts b/client/src/app/+my-library/my-history/my-history.component.ts
index fe6e86346..a72d22e1c 100644
--- a/client/src/app/+my-library/my-history/my-history.component.ts
+++ b/client/src/app/+my-library/my-history/my-history.component.ts
@@ -1,4 +1,3 @@
1import { Subject } from 'rxjs'
2import { tap } from 'rxjs/operators' 1import { tap } from 'rxjs/operators'
3import { Component, ComponentFactoryResolver, OnInit, ViewChild } from '@angular/core' 2import { Component, ComponentFactoryResolver, OnInit, ViewChild } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
@@ -109,9 +108,9 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
109 this.userService.updateMyProfile({ videosHistoryEnabled: this.videosHistoryEnabled }) 108 this.userService.updateMyProfile({ videosHistoryEnabled: this.videosHistoryEnabled })
110 .subscribe({ 109 .subscribe({
111 next: () => { 110 next: () => {
112 const message = this.videosHistoryEnabled === true ? 111 const message = this.videosHistoryEnabled === true
113 $localize`Videos history is enabled` : 112 ? $localize`Videos history is enabled`
114 $localize`Videos history is disabled` 113 : $localize`Videos history is disabled`
115 114
116 this.notifier.success(message) 115 this.notifier.success(message)
117 116
diff --git a/client/src/app/+my-library/my-library.component.ts b/client/src/app/+my-library/my-library.component.ts
index 2ee3559a7..16a7f63e3 100644
--- a/client/src/app/+my-library/my-library.component.ts
+++ b/client/src/app/+my-library/my-library.component.ts
@@ -17,7 +17,7 @@ export class MyLibraryComponent implements OnInit {
17 private serverService: ServerService, 17 private serverService: ServerService,
18 private authService: AuthService, 18 private authService: AuthService,
19 private screenService: ScreenService 19 private screenService: ScreenService
20 ) { } 20 ) { }
21 21
22 get isBroadcastMessageDisplayed () { 22 get isBroadcastMessageDisplayed () {
23 return this.screenService.isBroadcastMessageDisplayed 23 return this.screenService.isBroadcastMessageDisplayed
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
index b92377bca..764da2369 100644
--- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
@@ -29,7 +29,7 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit {
29 private notifier: Notifier, 29 private notifier: Notifier,
30 private authService: AuthService, 30 private authService: AuthService,
31 private modalService: NgbModal 31 private modalService: NgbModal
32 ) { 32 ) {
33 super() 33 super()
34 } 34 }
35 35
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
index 3e3c3c878..8bc78b2db 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
@@ -29,7 +29,7 @@ export class MyVideoPlaylistCreateComponent extends MyVideoPlaylistEdit implemen
29 private router: Router, 29 private router: Router,
30 private videoPlaylistService: VideoPlaylistService, 30 private videoPlaylistService: VideoPlaylistService,
31 private serverService: ServerService 31 private serverService: ServerService
32 ) { 32 ) {
33 super() 33 super()
34 } 34 }
35 35
@@ -78,7 +78,9 @@ export class MyVideoPlaylistCreateComponent extends MyVideoPlaylistEdit implemen
78 this.router.navigate([ '/my-library', 'video-playlists' ]) 78 this.router.navigate([ '/my-library', 'video-playlists' ])
79 }, 79 },
80 80
81 error: err => this.error = err.message 81 error: err => {
82 this.error = err.message
83 }
82 }) 84 })
83 } 85 }
84 86
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
index 6aff5dbd7..d6959a50e 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
@@ -57,7 +57,7 @@ export class MyVideoPlaylistElementsComponent implements OnInit, OnDestroy {
57 ] 57 ]
58 58
59 this.paramsSub = this.route.params.subscribe(routeParams => { 59 this.paramsSub = this.route.params.subscribe(routeParams => {
60 this.videoPlaylistId = routeParams[ 'videoPlaylistId' ] 60 this.videoPlaylistId = routeParams['videoPlaylistId']
61 this.loadElements() 61 this.loadElements()
62 62
63 this.loadPlaylistInfo() 63 this.loadPlaylistInfo()
@@ -145,8 +145,6 @@ export class MyVideoPlaylistElementsComponent implements OnInit, OnDestroy {
145 * we add a delay to prevent unwanted drag&drop. 145 * we add a delay to prevent unwanted drag&drop.
146 * 146 *
147 * @see {@link https://github.com/Chocobozzz/PeerTube/issues/2078} 147 * @see {@link https://github.com/Chocobozzz/PeerTube/issues/2078}
148 *
149 * @returns {null|number} Null for no delay, or a number in milliseconds.
150 */ 148 */
151 getDragStartDelay (): null | number { 149 getDragStartDelay (): null | number {
152 if (this.screenService.isInTouchScreen()) { 150 if (this.screenService.isInTouchScreen()) {
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
index a3f54279b..06ac3ad50 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
@@ -65,14 +65,16 @@ export class MyVideoPlaylistUpdateComponent extends MyVideoPlaylistEdit implemen
65 }) 65 })
66 ) 66 )
67 .subscribe({ 67 .subscribe({
68 next: ([ videoPlaylistToUpdate, videoPlaylistPrivacies]) => { 68 next: ([ videoPlaylistToUpdate, videoPlaylistPrivacies ]) => {
69 this.videoPlaylistToUpdate = videoPlaylistToUpdate 69 this.videoPlaylistToUpdate = videoPlaylistToUpdate
70 this.videoPlaylistPrivacies = videoPlaylistPrivacies 70 this.videoPlaylistPrivacies = videoPlaylistPrivacies
71 71
72 this.hydrateFormFromPlaylist() 72 this.hydrateFormFromPlaylist()
73 }, 73 },
74 74
75 error: err => this.error = err.message 75 error: err => {
76 this.error = err.message
77 }
76 }) 78 })
77 } 79 }
78 80
@@ -99,7 +101,9 @@ export class MyVideoPlaylistUpdateComponent extends MyVideoPlaylistEdit implemen
99 this.router.navigate([ '/my-library', 'video-playlists' ]) 101 this.router.navigate([ '/my-library', 'video-playlists' ])
100 }, 102 },
101 103
102 error: err => this.error = err.message 104 error: err => {
105 this.error = err.message
106 }
103 }) 107 })
104 } 108 }
105 109
diff --git a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
index 8c1f94bf3..960c9a4f7 100644
--- a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
+++ b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
@@ -25,7 +25,7 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
25 private notifier: Notifier, 25 private notifier: Notifier,
26 private userService: UserService, 26 private userService: UserService,
27 private modalService: NgbModal 27 private modalService: NgbModal
28 ) { 28 ) {
29 super() 29 super()
30 } 30 }
31 31
@@ -49,7 +49,9 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
49 const query = event.query 49 const query = event.query
50 this.userService.autocomplete(query) 50 this.userService.autocomplete(query)
51 .subscribe({ 51 .subscribe({
52 next: usernames => this.usernamePropositions = usernames, 52 next: usernames => {
53 this.usernamePropositions = usernames
54 },
53 55
54 error: err => this.notifier.error(err.message) 56 error: err => this.notifier.error(err.message)
55 }) 57 })
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts
index 4f9b71cc6..edb9392dd 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.ts
+++ b/client/src/app/+my-library/my-videos/my-videos.component.ts
@@ -49,7 +49,7 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
49 49
50 inputFilters: AdvancedInputFilter[] = [ 50 inputFilters: AdvancedInputFilter[] = [
51 { 51 {
52 queryParams: { 'search': 'isLive:true' }, 52 queryParams: { search: 'isLive:true' },
53 label: $localize`Only live videos` 53 label: $localize`Only live videos`
54 } 54 }
55 ] 55 ]
@@ -107,7 +107,7 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
107 107
108 async deleteSelectedVideos () { 108 async deleteSelectedVideos () {
109 const toDeleteVideosIds = Object.keys(this.selection) 109 const toDeleteVideosIds = Object.keys(this.selection)
110 .filter(k => this.selection[ k ] === true) 110 .filter(k => this.selection[k] === true)
111 .map(k => parseInt(k, 10)) 111 .map(k => parseInt(k, 10))
112 112
113 const res = await this.confirmService.confirm( 113 const res = await this.confirmService.confirm(