aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts2
-rw-r--r--client/src/app/+admin/follows/following-list/follow-modal.component.ts2
-rw-r--r--client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts2
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.ts2
-rw-r--r--client/src/app/+home/home.component.ts2
-rw-r--r--client/src/app/+search/search.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts3
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts4
-rw-r--r--client/src/app/app.component.ts4
-rw-r--r--client/src/app/core/notification/peertube-socket.service.ts2
-rw-r--r--client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts2
-rw-r--r--client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts3
-rw-r--r--client/src/app/shared/shared-moderation/user-ban-modal.component.ts2
-rw-r--r--client/src/assets/player/stats/stats-card.ts4
-rw-r--r--client/src/assets/player/webtorrent/peertube-chunk-store.ts2
-rw-r--r--client/src/standalone/videos/embed.ts4
-rw-r--r--client/src/standalone/videos/test-embed.ts2
19 files changed, 25 insertions, 23 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index be1a99289..f13fe4bf9 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -260,7 +260,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
260 this.loadCategoriesAndLanguages() 260 this.loadCategoriesAndLanguages()
261 } 261 }
262 262
263 async formValidated () { 263 formValidated () {
264 const value: ComponentCustomConfig = this.form.getRawValue() 264 const value: ComponentCustomConfig = this.form.getRawValue()
265 265
266 forkJoin([ 266 forkJoin([
diff --git a/client/src/app/+admin/follows/following-list/follow-modal.component.ts b/client/src/app/+admin/follows/following-list/follow-modal.component.ts
index c55fc8d81..c40b36e10 100644
--- a/client/src/app/+admin/follows/following-list/follow-modal.component.ts
+++ b/client/src/app/+admin/follows/following-list/follow-modal.component.ts
@@ -54,7 +54,7 @@ export class FollowModalComponent extends FormReactive implements OnInit {
54 return window.location.protocol === 'https:' 54 return window.location.protocol === 'https:'
55 } 55 }
56 56
57 private async addFollowing () { 57 private addFollowing () {
58 const hostsOrHandles = splitAndGetNotEmpty(this.form.value['hostsOrHandles']) 58 const hostsOrHandles = splitAndGetNotEmpty(this.form.value['hostsOrHandles'])
59 59
60 this.followService.follow(hostsOrHandles) 60 this.followService.follow(hostsOrHandles)
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts
index 512ceffd9..c09ce7293 100644
--- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts
+++ b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts
@@ -134,7 +134,7 @@ export class VideoCommentListComponent extends RestTable implements OnInit {
134 }) 134 })
135 } 135 }
136 136
137 private async removeComments (comments: VideoCommentAdmin[]) { 137 private removeComments (comments: VideoCommentAdmin[]) {
138 const commentArgs = comments.map(c => ({ videoId: c.video.id, commentId: c.id })) 138 const commentArgs = comments.map(c => ({ videoId: c.video.id, commentId: c.id }))
139 139
140 this.videoCommentService.deleteVideoComments(commentArgs) 140 this.videoCommentService.deleteVideoComments(commentArgs)
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts
index 39caf5ed5..1030759df 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/users/user-list/user-list.component.ts
@@ -206,7 +206,7 @@ export class UserListComponent extends RestTable implements OnInit {
206 }) 206 })
207 } 207 }
208 208
209 async setEmailsAsVerified (users: User[]) { 209 setEmailsAsVerified (users: User[]) {
210 this.userService.updateUsers(users, { emailVerified: true }) 210 this.userService.updateUsers(users, { emailVerified: true })
211 .subscribe({ 211 .subscribe({
212 next: () => { 212 next: () => {
diff --git a/client/src/app/+home/home.component.ts b/client/src/app/+home/home.component.ts
index 6e0c96760..f966a2b02 100644
--- a/client/src/app/+home/home.component.ts
+++ b/client/src/app/+home/home.component.ts
@@ -15,7 +15,7 @@ export class HomeComponent implements OnInit {
15 private customPageService: CustomPageService 15 private customPageService: CustomPageService
16 ) { } 16 ) { }
17 17
18 async ngOnInit () { 18 ngOnInit () {
19 this.customPageService.getInstanceHomepage() 19 this.customPageService.getInstanceHomepage()
20 .subscribe(({ content }) => this.homepageContent = content) 20 .subscribe(({ content }) => this.homepageContent = content)
21 } 21 }
diff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.ts
index 81d1006f8..fcf6ebbec 100644
--- a/client/src/app/+search/search.component.ts
+++ b/client/src/app/+search/search.component.ts
@@ -75,7 +75,7 @@ export class SearchComponent implements OnInit, OnDestroy {
75 75
76 this.subActivatedRoute = this.route.queryParams 76 this.subActivatedRoute = this.route.queryParams
77 .subscribe({ 77 .subscribe({
78 next: async queryParams => { 78 next: queryParams => {
79 const querySearch = queryParams['search'] 79 const querySearch = queryParams['search']
80 const searchTarget = queryParams['searchTarget'] 80 const searchTarget = queryParams['searchTarget']
81 81
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
index 98d66ff00..5c4152884 100644
--- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
@@ -71,7 +71,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
71 return languageId && this.existingCaptions.includes(languageId) 71 return languageId && this.existingCaptions.includes(languageId)
72 } 72 }
73 73
74 async addCaption () { 74 addCaption () {
75 const languageId = this.form.value['language'] 75 const languageId = this.form.value['language']
76 const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) 76 const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId)
77 77
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index 366c93a79..bf7fdeeed 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -231,7 +231,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
231 this.sortVideoCaptions() 231 this.sortVideoCaptions()
232 } 232 }
233 233
234 async deleteCaption (caption: VideoCaptionEdit) { 234 deleteCaption (caption: VideoCaptionEdit) {
235 // Caption recovers his former state 235 // Caption recovers his former state
236 if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) { 236 if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) {
237 caption.action = undefined 237 caption.action = undefined
diff --git a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts
index ef5c8ed87..b1e8bf989 100644
--- a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts
@@ -21,8 +21,9 @@ export class PrivacyConcernsComponent implements OnInit {
21 private serverService: ServerService 21 private serverService: ServerService
22 ) { } 22 ) { }
23 23
24 async ngOnInit () { 24 ngOnInit () {
25 this.serverConfig = this.serverService.getHTMLConfig() 25 this.serverConfig = this.serverService.getHTMLConfig()
26
26 if ( 27 if (
27 isWebRTCDisabled() || 28 isWebRTCDisabled() ||
28 this.serverConfig.tracker.enabled === false || 29 this.serverConfig.tracker.enabled === false ||
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index 2007bdecb..acfd46a41 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -113,7 +113,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
113 return this.userService.getAnonymousUser() 113 return this.userService.getAnonymousUser()
114 } 114 }
115 115
116 async ngOnInit () { 116 ngOnInit () {
117 this.serverConfig = this.serverService.getHTMLConfig() 117 this.serverConfig = this.serverService.getHTMLConfig()
118 118
119 PeertubePlayerManager.initState() 119 PeertubePlayerManager.initState()
@@ -640,7 +640,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
640 } 640 }
641 641
642 if (oldVideo && oldVideo.id !== newVideo.id) { 642 if (oldVideo && oldVideo.id !== newVideo.id) {
643 await this.peertubeSocket.unsubscribeLiveVideos(oldVideo.id) 643 this.peertubeSocket.unsubscribeLiveVideos(oldVideo.id)
644 } 644 }
645 645
646 if (!newVideo.isLive) return 646 if (!newVideo.isLive) return
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 4d5a9f75f..ae6046cc1 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -220,7 +220,7 @@ export class AppComponent implements OnInit, AfterViewInit {
220 } 220 }
221 } 221 }
222 222
223 private async openModalsIfNeeded () { 223 private openModalsIfNeeded () {
224 this.authService.userInformationLoaded 224 this.authService.userInformationLoaded
225 .pipe( 225 .pipe(
226 map(() => this.authService.getUser()), 226 map(() => this.authService.getUser()),
@@ -232,7 +232,7 @@ export class AppComponent implements OnInit, AfterViewInit {
232 ).subscribe(({ serverConfig, user }) => this._openAdminModalsIfNeeded(serverConfig, user)) 232 ).subscribe(({ serverConfig, user }) => this._openAdminModalsIfNeeded(serverConfig, user))
233 } 233 }
234 234
235 private async _openAdminModalsIfNeeded (serverConfig: ServerConfig, user: User) { 235 private _openAdminModalsIfNeeded (serverConfig: ServerConfig, user: User) {
236 if (user.noWelcomeModal !== true) return this.welcomeModal.show() 236 if (user.noWelcomeModal !== true) return this.welcomeModal.show()
237 237
238 if (user.noInstanceConfigWarningModal === true || !serverConfig.signup.allowed) return 238 if (user.noInstanceConfigWarningModal === true || !serverConfig.signup.allowed) return
diff --git a/client/src/app/core/notification/peertube-socket.service.ts b/client/src/app/core/notification/peertube-socket.service.ts
index eab1c63f2..50d5df68f 100644
--- a/client/src/app/core/notification/peertube-socket.service.ts
+++ b/client/src/app/core/notification/peertube-socket.service.ts
@@ -38,7 +38,7 @@ export class PeerTubeSocket {
38 this.liveVideosSocket.emit('subscribe', { videoId }) 38 this.liveVideosSocket.emit('subscribe', { videoId })
39 } 39 }
40 40
41 async unsubscribeLiveVideos (videoId: number) { 41 unsubscribeLiveVideos (videoId: number) {
42 if (!this.liveVideosSocket) return 42 if (!this.liveVideosSocket) return
43 43
44 this.liveVideosSocket.emit('unsubscribe', { videoId }) 44 this.liveVideosSocket.emit('unsubscribe', { videoId })
diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
index ccb0c5262..2600da8da 100644
--- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
+++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
@@ -49,7 +49,7 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI
49 this.form.reset() 49 this.form.reset()
50 } 50 }
51 51
52 async banUser () { 52 banUser () {
53 const moderationComment: string = this.form.value['moderationComment'] 53 const moderationComment: string = this.form.value['moderationComment']
54 54
55 this.abuseService.updateAbuse(this.abuseToComment, { moderationComment }) 55 this.abuseService.updateAbuse(this.abuseToComment, { moderationComment })
diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
index e7e34ce1e..a8cc9b593 100644
--- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
@@ -84,8 +84,9 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy {
84 84
85 this.modalService.open(this.modal, { 85 this.modalService.open(this.modal, {
86 centered: true, 86 centered: true,
87 beforeDismiss: async () => { 87 beforeDismiss: () => {
88 this.onModalDismiss() 88 this.onModalDismiss()
89
89 return true 90 return true
90 } 91 }
91 }) 92 })
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
index 0a2d5e93a..a03bd7286 100644
--- a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
+++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
@@ -43,7 +43,7 @@ export class UserBanModalComponent extends FormReactive implements OnInit {
43 this.openedModal.close() 43 this.openedModal.close()
44 } 44 }
45 45
46 async banUser () { 46 banUser () {
47 const reason = this.form.value['reason'] || undefined 47 const reason = this.form.value['reason'] || undefined
48 48
49 this.userService.banUsers(this.usersToBan, reason) 49 this.userService.banUsers(this.usersToBan, reason)
diff --git a/client/src/assets/player/stats/stats-card.ts b/client/src/assets/player/stats/stats-card.ts
index a32f6fb97..45fd30d55 100644
--- a/client/src/assets/player/stats/stats-card.ts
+++ b/client/src/assets/player/stats/stats-card.ts
@@ -86,7 +86,7 @@ class StatsCard extends Component {
86 this.updateInterval = setInterval(async () => { 86 this.updateInterval = setInterval(async () => {
87 try { 87 try {
88 const options = this.mode === 'p2p-media-loader' 88 const options = this.mode === 'p2p-media-loader'
89 ? await this.buildHLSOptions() 89 ? this.buildHLSOptions()
90 : await this.buildWebTorrentOptions() // Default 90 : await this.buildWebTorrentOptions() // Default
91 91
92 this.list.innerHTML = this.getListTemplate(options) 92 this.list.innerHTML = this.getListTemplate(options)
@@ -102,7 +102,7 @@ class StatsCard extends Component {
102 this.container.style.display = 'none' 102 this.container.style.display = 'none'
103 } 103 }
104 104
105 private async buildHLSOptions () { 105 private buildHLSOptions () {
106 const p2pMediaLoader = this.player_.p2pMediaLoader() 106 const p2pMediaLoader = this.player_.p2pMediaLoader()
107 const level = p2pMediaLoader.getCurrentLevel() 107 const level = p2pMediaLoader.getCurrentLevel()
108 108
diff --git a/client/src/assets/player/webtorrent/peertube-chunk-store.ts b/client/src/assets/player/webtorrent/peertube-chunk-store.ts
index 93ca8e1d8..81378c277 100644
--- a/client/src/assets/player/webtorrent/peertube-chunk-store.ts
+++ b/client/src/assets/player/webtorrent/peertube-chunk-store.ts
@@ -184,7 +184,7 @@ export class PeertubeChunkStore extends EventEmitter {
184 private runCleaner () { 184 private runCleaner () {
185 this.checkExpiration() 185 this.checkExpiration()
186 186
187 this.cleanerInterval = setInterval(async () => { 187 this.cleanerInterval = setInterval(() => {
188 this.checkExpiration() 188 this.checkExpiration()
189 }, PeertubeChunkStore.CLEANER_INTERVAL_MS) 189 }, PeertubeChunkStore.CLEANER_INTERVAL_MS)
190 } 190 }
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index f35f4a23a..36480922e 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -589,7 +589,7 @@ export class PeerTubeEmbed {
589 589
590 this.buildCSS() 590 this.buildCSS()
591 591
592 await this.buildDock(videoInfo) 592 this.buildDock(videoInfo)
593 593
594 this.initializeApi() 594 this.initializeApi()
595 595
@@ -665,7 +665,7 @@ export class PeerTubeEmbed {
665 } 665 }
666 } 666 }
667 667
668 private async buildDock (videoInfo: VideoDetails) { 668 private buildDock (videoInfo: VideoDetails) {
669 if (!this.controls) return 669 if (!this.controls) return
670 670
671 // On webtorrent fallback, player may have been disposed 671 // On webtorrent fallback, player may have been disposed
diff --git a/client/src/standalone/videos/test-embed.ts b/client/src/standalone/videos/test-embed.ts
index a051f1f89..301c95d7b 100644
--- a/client/src/standalone/videos/test-embed.ts
+++ b/client/src/standalone/videos/test-embed.ts
@@ -47,7 +47,7 @@ window.addEventListener('load', async () => {
47 let playbackRates: number[] = [] 47 let playbackRates: number[] = []
48 let currentRate = await player.getPlaybackRate() 48 let currentRate = await player.getPlaybackRate()
49 49
50 const updateRates = async () => { 50 const updateRates = () => {
51 const rateListEl = document.querySelector('#rate-list') 51 const rateListEl = document.querySelector('#rate-list')
52 rateListEl.innerHTML = '' 52 rateListEl.innerHTML = ''
53 53