aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts4
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.ts2
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.ts4
-rw-r--r--client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts2
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts9
-rw-r--r--client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts3
-rw-r--r--client/src/app/+my-account/shared/actor-avatar-info.component.ts2
-rw-r--r--client/src/app/app.module.ts2
-rw-r--r--client/src/app/core/auth/auth.service.ts2
-rw-r--r--client/src/app/core/server/server.service.ts2
-rw-r--r--client/src/app/core/theme/theme.service.ts4
-rw-r--r--client/src/app/menu/menu.component.ts2
-rw-r--r--client/src/app/search/advanced-search.model.ts4
-rw-r--r--client/src/app/shared/buttons/action-dropdown.component.ts6
-rw-r--r--client/src/app/shared/buttons/button.component.ts6
-rw-r--r--client/src/app/shared/buttons/edit-button.component.ts2
-rw-r--r--client/src/app/shared/misc/help.component.ts2
-rw-r--r--client/src/app/shared/misc/peertube-local-storage.ts6
-rw-r--r--client/src/app/shared/misc/utils.ts2
-rw-r--r--client/src/app/shared/overview/videos-overview.model.ts1
-rw-r--r--client/src/app/shared/rest/rest-extractor.service.ts4
-rw-r--r--client/src/app/shared/rest/rest.service.ts2
-rw-r--r--client/src/app/shared/users/user.model.ts1
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts6
-rw-r--r--client/src/app/shared/video/video-edit.model.ts3
-rw-r--r--client/src/app/shared/video/video-feed.component.ts2
-rw-r--r--client/src/app/shared/video/video.service.ts2
-rw-r--r--client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts4
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts6
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts2
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-send.ts2
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts2
-rw-r--r--client/src/app/videos/+video-watch/comment/linkifier.service.ts6
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment-add.component.ts2
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.component.ts2
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.model.ts2
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.service.ts4
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.ts2
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts14
39 files changed, 70 insertions, 65 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 25b303f44..9a9298825 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
@@ -62,7 +62,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
62 } 62 }
63 63
64 ngOnInit () { 64 ngOnInit () {
65 const formGroupData = { 65 const formGroupData: any = {
66 instanceName: this.customConfigValidatorsService.INSTANCE_NAME, 66 instanceName: this.customConfigValidatorsService.INSTANCE_NAME,
67 instanceShortDescription: this.customConfigValidatorsService.INSTANCE_SHORT_DESCRIPTION, 67 instanceShortDescription: this.customConfigValidatorsService.INSTANCE_SHORT_DESCRIPTION,
68 instanceDescription: null, 68 instanceDescription: null,
@@ -202,7 +202,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
202 } 202 }
203 203
204 private updateForm () { 204 private updateForm () {
205 const data = { 205 const data: any = {
206 instanceName: this.customConfig.instance.name, 206 instanceName: this.customConfig.instance.name,
207 instanceShortDescription: this.customConfig.instance.shortDescription, 207 instanceShortDescription: this.customConfig.instance.shortDescription,
208 instanceDescription: this.customConfig.instance.description, 208 instanceDescription: this.customConfig.instance.description,
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts
index 99ce5804b..a4d696e69 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.ts
+++ b/client/src/app/+admin/users/user-edit/user-edit.ts
@@ -7,7 +7,7 @@ export abstract class UserEdit extends FormReactive {
7 7
8 videoQuotaOptions: { value: string, label: string }[] = [] 8 videoQuotaOptions: { value: string, label: string }[] = []
9 videoQuotaDailyOptions: { value: string, label: string }[] = [] 9 videoQuotaDailyOptions: { value: string, label: string }[] = []
10 roles = Object.keys(USER_ROLE_LABELS).map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] })) 10 roles = Object.keys(USER_ROLE_LABELS).map((key: any) => ({ value: key.toString(), label: USER_ROLE_LABELS[key] }))
11 11
12 protected abstract serverService: ServerService 12 protected abstract serverService: ServerService
13 protected abstract configService: ConfigService 13 protected abstract configService: ConfigService
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 ab2250722..0d7f88d2b 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
@@ -45,12 +45,12 @@ export class UserListComponent extends RestTable implements OnInit {
45 { 45 {
46 label: this.i18n('Ban'), 46 label: this.i18n('Ban'),
47 handler: users => this.openBanUserModal(users), 47 handler: users => this.openBanUserModal(users),
48 isDisplayed: users => users.every(u => u.blocked === false) 48 isDisplayed: users => users.every((u: any) => u.blocked === false)
49 }, 49 },
50 { 50 {
51 label: this.i18n('Unban'), 51 label: this.i18n('Unban'),
52 handler: users => this.unbanUsers(users), 52 handler: users => this.unbanUsers(users),
53 isDisplayed: users => users.every(u => u.blocked === true) 53 isDisplayed: users => users.every((u: any) => u.blocked === true)
54 } 54 }
55 ] 55 ]
56 } 56 }
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts
index 56697030b..f2b8a4e26 100644
--- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts
+++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts
@@ -17,7 +17,7 @@ import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators
17 styleUrls: [ './my-account-video-channel-edit.component.scss' ] 17 styleUrls: [ './my-account-video-channel-edit.component.scss' ]
18}) 18})
19export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelEdit implements OnInit, OnDestroy { 19export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelEdit implements OnInit, OnDestroy {
20 @ViewChild('avatarfileInput') avatarfileInput 20 @ViewChild('avatarfileInput') avatarfileInput: any
21 21
22 error: string 22 error: string
23 23
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
index 7560f0128..52307f09e 100644
--- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
+++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
@@ -66,7 +66,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
66 } 66 }
67 67
68 isInSelectionMode () { 68 isInSelectionMode () {
69 return Object.keys(this.checkedVideos).some(k => this.checkedVideos[ k ] === true) 69 return Object.keys(this.checkedVideos).some((k: any) => this.checkedVideos[ k ] === true)
70 } 70 }
71 71
72 getVideosObservable (page: number) { 72 getVideosObservable (page: number) {
@@ -81,7 +81,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
81 81
82 async deleteSelectedVideos () { 82 async deleteSelectedVideos () {
83 const toDeleteVideosIds = Object.keys(this.checkedVideos) 83 const toDeleteVideosIds = Object.keys(this.checkedVideos)
84 .filter(k => this.checkedVideos[ k ] === true) 84 .filter((k: any) => this.checkedVideos[ k ] === true)
85 .map(k => parseInt(k, 10)) 85 .map(k => parseInt(k, 10))
86 86
87 const res = await this.confirmService.confirm( 87 const res = await this.confirmService.confirm(
@@ -168,9 +168,10 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
168 } 168 }
169 169
170 private spliceVideosById (id: number) { 170 private spliceVideosById (id: number) {
171 for (const key of Object.keys(this.loadedPages)) { 171 let key: any
172 for (key of Object.keys(this.loadedPages)) {
172 const videos = this.loadedPages[ key ] 173 const videos = this.loadedPages[ key ]
173 const index = videos.findIndex(v => v.id === id) 174 const index = videos.findIndex((v: any) => v.id === id)
174 175
175 if (index !== -1) { 176 if (index !== -1) {
176 videos.splice(index, 1) 177 videos.splice(index, 1)
diff --git a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
index 7437b939a..eb3f9404f 100644
--- a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
+++ b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
@@ -49,7 +49,8 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
49 .catch((_) => _) // Called when closing (cancel) the modal without validating, do nothing 49 .catch((_) => _) // Called when closing (cancel) the modal without validating, do nothing
50 } 50 }
51 51
52 search (event) { 52 // TODO: typing
53 search (event: any) {
53 const query = event.query 54 const query = event.query
54 this.userService.autocomplete(query) 55 this.userService.autocomplete(query)
55 .subscribe( 56 .subscribe(
diff --git a/client/src/app/+my-account/shared/actor-avatar-info.component.ts b/client/src/app/+my-account/shared/actor-avatar-info.component.ts
index 7b80b1ed4..b4505a7f2 100644
--- a/client/src/app/+my-account/shared/actor-avatar-info.component.ts
+++ b/client/src/app/+my-account/shared/actor-avatar-info.component.ts
@@ -10,7 +10,7 @@ import { Account } from '@app/shared/account/account.model'
10 styleUrls: [ './actor-avatar-info.component.scss' ] 10 styleUrls: [ './actor-avatar-info.component.scss' ]
11}) 11})
12export class ActorAvatarInfoComponent { 12export class ActorAvatarInfoComponent {
13 @ViewChild('avatarfileInput') avatarfileInput 13 @ViewChild('avatarfileInput') avatarfileInput: any
14 14
15 @Input() actor: VideoChannel | Account 15 @Input() actor: VideoChannel | Account
16 16
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts
index 34e890b40..371199442 100644
--- a/client/src/app/app.module.ts
+++ b/client/src/app/app.module.ts
@@ -69,7 +69,7 @@ export function metaFactory (serverService: ServerService): MetaLoader {
69 providers: [ 69 providers: [
70 { 70 {
71 provide: TRANSLATIONS, 71 provide: TRANSLATIONS,
72 useFactory: (locale) => { 72 useFactory: (locale: string) => {
73 // On dev mode, test localization 73 // On dev mode, test localization
74 if (isOnDevLocale()) { 74 if (isOnDevLocale()) {
75 locale = buildFileLocale(getDevLocale()) 75 locale = buildFileLocale(getDevLocale())
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index 9c36b946e..5315c8b1d 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -221,7 +221,7 @@ export class AuthService {
221 } 221 }
222 222
223 refreshUserInformation () { 223 refreshUserInformation () {
224 const obj = { 224 const obj: any = {
225 access_token: this.user.getAccessToken(), 225 access_token: this.user.getAccessToken(),
226 refresh_token: null, 226 refresh_token: null,
227 token_type: this.user.getTokenType(), 227 token_type: this.user.getTokenType(),
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index 2f1ef1fc2..1663a052c 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -155,7 +155,7 @@ export class ServerService {
155 .pipe( 155 .pipe(
156 switchMap(translations => { 156 switchMap(translations => {
157 return this.http.get(ServerService.BASE_VIDEO_URL + attributeName) 157 return this.http.get(ServerService.BASE_VIDEO_URL + attributeName)
158 .pipe(map(data => ({ data, translations }))) 158 .pipe(map((data: any) => ({ data, translations })))
159 }) 159 })
160 ) 160 )
161 .subscribe(({ data, translations }) => { 161 .subscribe(({ data, translations }) => {
diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts
index a6eef0898..50c19ecac 100644
--- a/client/src/app/core/theme/theme.service.ts
+++ b/client/src/app/core/theme/theme.service.ts
@@ -5,7 +5,7 @@ import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
5export class ThemeService { 5export class ThemeService {
6 private theme = document.querySelector('body') 6 private theme = document.querySelector('body')
7 private darkTheme = false 7 private darkTheme = false
8 private previousTheme = {} 8 private previousTheme: { [ id: string ]: string } = {}
9 9
10 constructor () { 10 constructor () {
11 // initialise the alternative theme with dark theme colors 11 // initialise the alternative theme with dark theme colors
@@ -33,7 +33,7 @@ export class ThemeService {
33 } 33 }
34 } 34 }
35 35
36 private switchProperty (property, newValue?) { 36 private switchProperty (property: string, newValue?: string) {
37 const propertyOldvalue = window.getComputedStyle(this.theme).getPropertyValue('--' + property) 37 const propertyOldvalue = window.getComputedStyle(this.theme).getPropertyValue('--' + property)
38 this.theme.style.setProperty('--' + property, (newValue) ? newValue : this.previousTheme[property]) 38 this.theme.style.setProperty('--' + property, (newValue) ? newValue : this.previousTheme[property])
39 this.previousTheme[property] = propertyOldvalue 39 this.previousTheme[property] = propertyOldvalue
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 95926f5f0..348700c09 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -18,7 +18,7 @@ export class MenuComponent implements OnInit {
18 userHasAdminAccess = false 18 userHasAdminAccess = false
19 helpVisible = false 19 helpVisible = false
20 20
21 private routesPerRight = { 21 private routesPerRight: any = {
22 [UserRight.MANAGE_USERS]: '/admin/users', 22 [UserRight.MANAGE_USERS]: '/admin/users',
23 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', 23 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends',
24 [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses', 24 [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses',
diff --git a/client/src/app/search/advanced-search.model.ts b/client/src/app/search/advanced-search.model.ts
index 033fa9bba..1d6c89282 100644
--- a/client/src/app/search/advanced-search.model.ts
+++ b/client/src/app/search/advanced-search.model.ts
@@ -53,7 +53,7 @@ export class AdvancedSearch {
53 } 53 }
54 54
55 containsValues () { 55 containsValues () {
56 const obj = this.toUrlObject() 56 const obj: any = this.toUrlObject()
57 for (const k of Object.keys(obj)) { 57 for (const k of Object.keys(obj)) {
58 if (k === 'sort') continue // Exception 58 if (k === 'sort') continue // Exception
59 59
@@ -113,7 +113,7 @@ export class AdvancedSearch {
113 size () { 113 size () {
114 let acc = 0 114 let acc = 0
115 115
116 const obj = this.toUrlObject() 116 const obj: any = this.toUrlObject()
117 for (const k of Object.keys(obj)) { 117 for (const k of Object.keys(obj)) {
118 if (k === 'sort') continue // Exception 118 if (k === 'sort') continue // Exception
119 119
diff --git a/client/src/app/shared/buttons/action-dropdown.component.ts b/client/src/app/shared/buttons/action-dropdown.component.ts
index 022ab5ee8..9877f639d 100644
--- a/client/src/app/shared/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/buttons/action-dropdown.component.ts
@@ -2,9 +2,9 @@ import { Component, Input } from '@angular/core'
2 2
3export type DropdownAction<T> = { 3export type DropdownAction<T> = {
4 label?: string 4 label?: string
5 handler?: (T) => any 5 handler?: (T: any) => any
6 linkBuilder?: (T) => (string | number)[] 6 linkBuilder?: (T: any) => (string | number)[]
7 isDisplayed?: (T) => boolean 7 isDisplayed?: (T: any) => boolean
8} 8}
9 9
10@Component({ 10@Component({
diff --git a/client/src/app/shared/buttons/button.component.ts b/client/src/app/shared/buttons/button.component.ts
index 967cb1409..cccf98bc3 100644
--- a/client/src/app/shared/buttons/button.component.ts
+++ b/client/src/app/shared/buttons/button.component.ts
@@ -8,9 +8,9 @@ import { Component, Input } from '@angular/core'
8 8
9export class ButtonComponent { 9export class ButtonComponent {
10 @Input() label = '' 10 @Input() label = ''
11 @Input() className = undefined 11 @Input() className: any = undefined
12 @Input() icon = undefined 12 @Input() icon: any = undefined
13 @Input() title = undefined 13 @Input() title: any = undefined
14 14
15 getTitle () { 15 getTitle () {
16 return this.title || this.label 16 return this.title || this.label
diff --git a/client/src/app/shared/buttons/edit-button.component.ts b/client/src/app/shared/buttons/edit-button.component.ts
index 7abaacc26..ea552663a 100644
--- a/client/src/app/shared/buttons/edit-button.component.ts
+++ b/client/src/app/shared/buttons/edit-button.component.ts
@@ -8,5 +8,5 @@ import { Component, Input } from '@angular/core'
8 8
9export class EditButtonComponent { 9export class EditButtonComponent {
10 @Input() label: string 10 @Input() label: string
11 @Input() routerLink = [] 11 @Input() routerLink: any = []
12} 12}
diff --git a/client/src/app/shared/misc/help.component.ts b/client/src/app/shared/misc/help.component.ts
index ba0452e77..ccce1ccfa 100644
--- a/client/src/app/shared/misc/help.component.ts
+++ b/client/src/app/shared/misc/help.component.ts
@@ -60,7 +60,7 @@ export class HelpComponent implements OnInit, OnChanges {
60 } 60 }
61 61
62 private createMarkdownList (rules: string[]) { 62 private createMarkdownList (rules: string[]) {
63 const rulesToText = { 63 const rulesToText: any = {
64 'emphasis': this.i18n('Emphasis'), 64 'emphasis': this.i18n('Emphasis'),
65 'link': this.i18n('Links'), 65 'link': this.i18n('Links'),
66 'newline': this.i18n('New lines'), 66 'newline': this.i18n('New lines'),
diff --git a/client/src/app/shared/misc/peertube-local-storage.ts b/client/src/app/shared/misc/peertube-local-storage.ts
index 260f994b6..fb5c45acf 100644
--- a/client/src/app/shared/misc/peertube-local-storage.ts
+++ b/client/src/app/shared/misc/peertube-local-storage.ts
@@ -6,7 +6,7 @@ class MemoryStorage {
6 [key: string]: any 6 [key: string]: any
7 [index: number]: string 7 [index: number]: string
8 8
9 getItem (key) { 9 getItem (key: any) {
10 const stringKey = String(key) 10 const stringKey = String(key)
11 if (valuesMap.has(key)) { 11 if (valuesMap.has(key)) {
12 return String(valuesMap.get(stringKey)) 12 return String(valuesMap.get(stringKey))
@@ -15,11 +15,11 @@ class MemoryStorage {
15 return null 15 return null
16 } 16 }
17 17
18 setItem (key, val) { 18 setItem (key: any, val: any) {
19 valuesMap.set(String(key), String(val)) 19 valuesMap.set(String(key), String(val))
20 } 20 }
21 21
22 removeItem (key) { 22 removeItem (key: any) {
23 valuesMap.delete(key) 23 valuesMap.delete(key)
24 } 24 }
25 25
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts
index c8b7ebc67..78be2e5dd 100644
--- a/client/src/app/shared/misc/utils.ts
+++ b/client/src/app/shared/misc/utils.ts
@@ -102,7 +102,7 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
102 return fd 102 return fd
103} 103}
104 104
105function lineFeedToHtml (obj: object, keyToNormalize: string) { 105function lineFeedToHtml (obj: any, keyToNormalize: string) {
106 return immutableAssign(obj, { 106 return immutableAssign(obj, {
107 [keyToNormalize]: obj[keyToNormalize].replace(/\r?\n|\r/g, '<br />') 107 [keyToNormalize]: obj[keyToNormalize].replace(/\r?\n|\r/g, '<br />')
108 }) 108 })
diff --git a/client/src/app/shared/overview/videos-overview.model.ts b/client/src/app/shared/overview/videos-overview.model.ts
index cf02bdb3d..c8eafc8e8 100644
--- a/client/src/app/shared/overview/videos-overview.model.ts
+++ b/client/src/app/shared/overview/videos-overview.model.ts
@@ -16,4 +16,5 @@ export class VideosOverview implements VideosOverviewServer {
16 tag: string 16 tag: string
17 videos: Video[] 17 videos: Video[]
18 }[] 18 }[]
19 [key: string]: any
19} 20}
diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts
index 6492aa66d..934f6c618 100644
--- a/client/src/app/shared/rest/rest-extractor.service.ts
+++ b/client/src/app/shared/rest/rest-extractor.service.ts
@@ -33,7 +33,7 @@ export class RestExtractor {
33 return this.applyToResultListData(result, this.convertDateToHuman, [ fieldsToConvert ]) 33 return this.applyToResultListData(result, this.convertDateToHuman, [ fieldsToConvert ])
34 } 34 }
35 35
36 convertDateToHuman (target: object, fieldsToConvert: string[]) { 36 convertDateToHuman (target: any, fieldsToConvert: string[]) {
37 fieldsToConvert.forEach(field => target[field] = dateToHuman(target[field])) 37 fieldsToConvert.forEach(field => target[field] = dateToHuman(target[field]))
38 38
39 return target 39 return target
@@ -83,7 +83,7 @@ export class RestExtractor {
83 errorMessage = err 83 errorMessage = err
84 } 84 }
85 85
86 const errorObj = { 86 const errorObj: any = {
87 message: errorMessage, 87 message: errorMessage,
88 status: undefined, 88 status: undefined,
89 body: undefined 89 body: undefined
diff --git a/client/src/app/shared/rest/rest.service.ts b/client/src/app/shared/rest/rest.service.ts
index 4560c2024..41824a18f 100644
--- a/client/src/app/shared/rest/rest.service.ts
+++ b/client/src/app/shared/rest/rest.service.ts
@@ -32,7 +32,7 @@ export class RestService {
32 return newParams 32 return newParams
33 } 33 }
34 34
35 addObjectParams (params: HttpParams, object: object) { 35 addObjectParams (params: HttpParams, object: any) {
36 for (const name of Object.keys(object)) { 36 for (const name of Object.keys(object)) {
37 const value = object[name] 37 const value = object[name]
38 if (!value) continue 38 if (!value) continue
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index 7c840ffa7..e6b612054 100644
--- a/client/src/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
@@ -43,6 +43,7 @@ export class User implements UserServerModel {
43 43
44 blocked: boolean 44 blocked: boolean
45 blockedReason?: string 45 blockedReason?: string
46 [key: string]: any
46 47
47 constructor (hash: UserConstructorHash) { 48 constructor (hash: UserConstructorHash) {
48 this.id = hash.id 49 this.id = hash.id
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 1f43f974c..87814d4ba 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -27,7 +27,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
27 sort: VideoSortField = '-publishedAt' 27 sort: VideoSortField = '-publishedAt'
28 categoryOneOf?: number 28 categoryOneOf?: number
29 defaultSort: VideoSortField = '-publishedAt' 29 defaultSort: VideoSortField = '-publishedAt'
30 syndicationItems = [] 30 syndicationItems: any = []
31 31
32 loadOnInit = true 32 loadOnInit = true
33 marginContent = true 33 marginContent = true
@@ -59,7 +59,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
59 private resizeSubscription: Subscription 59 private resizeSubscription: Subscription
60 60
61 abstract getVideosObservable (page: number): Observable<{ videos: Video[], totalVideos: number}> 61 abstract getVideosObservable (page: number): Observable<{ videos: Video[], totalVideos: number}>
62 abstract generateSyndicationList () 62 abstract generateSyndicationList (): any
63 63
64 get user () { 64 get user () {
65 return this.authService.getUser() 65 return this.authService.getUser()
@@ -209,7 +209,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
209 } 209 }
210 210
211 protected setNewRouteParams () { 211 protected setNewRouteParams () {
212 const paramsObject = this.buildRouteParams() 212 const paramsObject: any = this.buildRouteParams()
213 213
214 const queryParams = Object.keys(paramsObject).map(p => p + '=' + paramsObject[p]).join('&') 214 const queryParams = Object.keys(paramsObject).map(p => p + '=' + paramsObject[p]).join('&')
215 this.location.replaceState(this.currentRoute, queryParams) 215 this.location.replaceState(this.currentRoute, queryParams)
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts
index 0046be964..a62277e04 100644
--- a/client/src/app/shared/video/video-edit.model.ts
+++ b/client/src/app/shared/video/video-edit.model.ts
@@ -25,6 +25,7 @@ export class VideoEdit implements VideoUpdate {
25 uuid?: string 25 uuid?: string
26 id?: number 26 id?: number
27 scheduleUpdate?: VideoScheduleUpdate 27 scheduleUpdate?: VideoScheduleUpdate
28 [key: string]: any
28 29
29 constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { 30 constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) {
30 if (video) { 31 if (video) {
@@ -49,7 +50,7 @@ export class VideoEdit implements VideoUpdate {
49 } 50 }
50 } 51 }
51 52
52 patch (values: Object) { 53 patch (values: any) {
53 Object.keys(values).forEach((key) => { 54 Object.keys(values).forEach((key) => {
54 this[ key ] = values[ key ] 55 this[ key ] = values[ key ]
55 }) 56 })
diff --git a/client/src/app/shared/video/video-feed.component.ts b/client/src/app/shared/video/video-feed.component.ts
index 6922153c0..be6c80c3f 100644
--- a/client/src/app/shared/video/video-feed.component.ts
+++ b/client/src/app/shared/video/video-feed.component.ts
@@ -6,5 +6,5 @@ import { Component, Input } from '@angular/core'
6 templateUrl: './video-feed.component.html' 6 templateUrl: './video-feed.component.html'
7}) 7})
8export class VideoFeedComponent { 8export class VideoFeedComponent {
9 @Input() syndicationItems 9 @Input() syndicationItems: any
10} 10}
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 724a0bde9..6283cf84d 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -276,7 +276,7 @@ export class VideoService implements VideosProvider {
276 return this.authHttp 276 return this.authHttp
277 .get(environment.apiUrl + descriptionPath) 277 .get(environment.apiUrl + descriptionPath)
278 .pipe( 278 .pipe(
279 map(res => res[ 'description' ]), 279 map((res: any) => res[ 'description' ]),
280 catchError(err => this.restExtractor.handleError(err)) 280 catchError(err => this.restExtractor.handleError(err))
281 ) 281 )
282 } 282 }
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 07c33030a..a2c9237ad 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
@@ -19,7 +19,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
19 19
20 @ViewChild('modal') modal: ElementRef 20 @ViewChild('modal') modal: ElementRef
21 21
22 videoCaptionLanguages = [] 22 videoCaptionLanguages: any = []
23 23
24 private openedModal: NgbModalRef 24 private openedModal: NgbModalRef
25 private closingModal = false 25 private closingModal = false
@@ -73,7 +73,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
73 this.hide() 73 this.hide()
74 74
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: any) => l.id === languageId)
77 77
78 this.captionAdded.emit({ 78 this.captionAdded.emit({
79 language: languageObject, 79 language: languageObject,
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 eb9396d70..a56733e57 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
@@ -48,7 +48,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
48 calendarTimezone: string 48 calendarTimezone: string
49 calendarDateFormat: string 49 calendarDateFormat: string
50 50
51 private schedulerInterval 51 private schedulerInterval: any
52 private firstPatchDone = false 52 private firstPatchDone = false
53 private initialVideoCaptions: string[] = [] 53 private initialVideoCaptions: string[] = []
54 54
@@ -77,13 +77,13 @@ export class VideoEditComponent implements OnInit, OnDestroy {
77 } 77 }
78 78
79 updateForm () { 79 updateForm () {
80 const defaultValues = { 80 const defaultValues: any = {
81 nsfw: 'false', 81 nsfw: 'false',
82 commentsEnabled: 'true', 82 commentsEnabled: 'true',
83 waitTranscoding: 'true', 83 waitTranscoding: 'true',
84 tags: [] 84 tags: []
85 } 85 }
86 const obj = { 86 const obj: any = {
87 name: this.videoValidatorsService.VIDEO_NAME, 87 name: this.videoValidatorsService.VIDEO_NAME,
88 privacy: this.videoValidatorsService.VIDEO_PRIVACY, 88 privacy: this.videoValidatorsService.VIDEO_PRIVACY,
89 channelId: this.videoValidatorsService.VIDEO_CHANNEL, 89 channelId: this.videoValidatorsService.VIDEO_CHANNEL,
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts
index 0f7184ff8..9a50e2ab2 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts
@@ -23,7 +23,7 @@ import { VideoImportService } from '@app/shared/video-import'
23}) 23})
24export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate { 24export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate {
25 @Output() firstStepDone = new EventEmitter<string>() 25 @Output() firstStepDone = new EventEmitter<string>()
26 @ViewChild('torrentfileInput') torrentfileInput 26 @ViewChild('torrentfileInput') torrentfileInput: any
27 27
28 videoFileName: string 28 videoFileName: string
29 magnetUri = '' 29 magnetUri = ''
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-send.ts b/client/src/app/videos/+video-edit/video-add-components/video-send.ts
index 6d1bac3f2..cf9d47cbe 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-send.ts
@@ -30,7 +30,7 @@ export abstract class VideoSend extends FormReactive implements OnInit, CanCompo
30 protected videoService: VideoService 30 protected videoService: VideoService
31 protected videoCaptionService: VideoCaptionService 31 protected videoCaptionService: VideoCaptionService
32 32
33 abstract canDeactivate () 33 abstract canDeactivate (): any
34 34
35 ngOnInit () { 35 ngOnInit () {
36 this.buildForm({}) 36 this.buildForm({})
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
index 941dc5441..fa6ee0c23 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
@@ -25,7 +25,7 @@ import { VideoCaptionService } from '@app/shared/video-caption'
25}) 25})
26export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate { 26export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate {
27 @Output() firstStepDone = new EventEmitter<string>() 27 @Output() firstStepDone = new EventEmitter<string>()
28 @ViewChild('videofileInput') videofileInput 28 @ViewChild('videofileInput') videofileInput: any
29 29
30 // So that it can be accessed in the template 30 // So that it can be accessed in the template
31 readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY 31 readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY
diff --git a/client/src/app/videos/+video-watch/comment/linkifier.service.ts b/client/src/app/videos/+video-watch/comment/linkifier.service.ts
index 3f4072efd..9ad419a69 100644
--- a/client/src/app/videos/+video-watch/comment/linkifier.service.ts
+++ b/client/src/app/videos/+video-watch/comment/linkifier.service.ts
@@ -1,7 +1,7 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { getAbsoluteAPIUrl } from '@app/shared/misc/utils' 2import { getAbsoluteAPIUrl } from '@app/shared/misc/utils'
3import * as linkify from 'linkifyjs' 3const linkify = require('linkifyjs')
4import * as linkifyHtml from 'linkifyjs/html' 4const linkifyHtml = require('linkifyjs/html')
5 5
6@Injectable() 6@Injectable()
7export class LinkifierService { 7export class LinkifierService {
@@ -40,7 +40,7 @@ export class LinkifierService {
40 const TT_UNDERSCORE = TT.UNDERSCORE 40 const TT_UNDERSCORE = TT.UNDERSCORE
41 const TT_DOT = TT.DOT 41 const TT_DOT = TT.DOT
42 42
43 function MENTION (value) { 43 function MENTION (value: any) {
44 this.v = value 44 this.v = value
45 } 45 }
46 46
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
index fb7de0e04..ba3c0398e 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
@@ -76,7 +76,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
76 this.formValidated() 76 this.formValidated()
77 } 77 }
78 78
79 openVisitorModal (event) { 79 openVisitorModal (event: any) {
80 if (this.user === null) { // we only open it for visitors 80 if (this.user === null) { // we only open it for visitors
81 // fixing ng-bootstrap ModalService and the "Expression Changed After It Has Been Checked" Error 81 // fixing ng-bootstrap ModalService and the "Expression Changed After It Has Been Checked" Error
82 event.srcElement.blur() 82 event.srcElement.blur()
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.ts b/client/src/app/videos/+video-watch/comment/video-comment.component.ts
index e90008de9..982470786 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.component.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment.component.ts
@@ -26,7 +26,7 @@ export class VideoCommentComponent implements OnInit, OnChanges {
26 @Output() resetReply = new EventEmitter() 26 @Output() resetReply = new EventEmitter()
27 27
28 sanitizedCommentHTML = '' 28 sanitizedCommentHTML = ''
29 newParentComments = [] 29 newParentComments: any = []
30 30
31 constructor ( 31 constructor (
32 private linkifierService: LinkifierService, 32 private linkifierService: LinkifierService,
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.model.ts b/client/src/app/videos/+video-watch/comment/video-comment.model.ts
index fe591811e..824fb24c3 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.model.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment.model.ts
@@ -14,7 +14,7 @@ export class VideoComment implements VideoCommentServerModel {
14 account: AccountInterface 14 account: AccountInterface
15 totalReplies: number 15 totalReplies: number
16 by: string 16 by: string
17 accountAvatarUrl 17 accountAvatarUrl: string
18 18
19 constructor (hash: VideoCommentServerModel) { 19 constructor (hash: VideoCommentServerModel) {
20 this.id = hash.id 20 this.id = hash.id
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.service.ts b/client/src/app/videos/+video-watch/comment/video-comment.service.ts
index 9bcb4b7de..7d9c2d0ad 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.service.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment.service.ts
@@ -32,7 +32,7 @@ export class VideoCommentService {
32 32
33 return this.authHttp.post(url, normalizedComment) 33 return this.authHttp.post(url, normalizedComment)
34 .pipe( 34 .pipe(
35 map(data => this.extractVideoComment(data['comment'])), 35 map((data: any) => this.extractVideoComment(data['comment'])),
36 catchError(err => this.restExtractor.handleError(err)) 36 catchError(err => this.restExtractor.handleError(err))
37 ) 37 )
38 } 38 }
@@ -43,7 +43,7 @@ export class VideoCommentService {
43 43
44 return this.authHttp.post(url, normalizedComment) 44 return this.authHttp.post(url, normalizedComment)
45 .pipe( 45 .pipe(
46 map(data => this.extractVideoComment(data[ 'comment' ])), 46 map((data: any) => this.extractVideoComment(data[ 'comment' ])),
47 catchError(err => this.restExtractor.handleError(err)) 47 catchError(err => this.restExtractor.handleError(err))
48 ) 48 )
49 } 49 }
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts
index c864d82b7..4c1bdf2dd 100644
--- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts
@@ -35,7 +35,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
35 threadComments: { [ id: number ]: VideoCommentThreadTree } = {} 35 threadComments: { [ id: number ]: VideoCommentThreadTree } = {}
36 threadLoading: { [ id: number ]: boolean } = {} 36 threadLoading: { [ id: number ]: boolean } = {}
37 37
38 syndicationItems = [] 38 syndicationItems: any = []
39 39
40 private sub: Subscription 40 private sub: Subscription
41 41
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 c5deddf05..ed5e723c9 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -7,7 +7,7 @@ import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-supp
7import { MetaService } from '@ngx-meta/core' 7import { MetaService } from '@ngx-meta/core'
8import { NotificationsService } from 'angular2-notifications' 8import { NotificationsService } from 'angular2-notifications'
9import { forkJoin, Subscription } from 'rxjs' 9import { forkJoin, Subscription } from 'rxjs'
10import * as videojs from 'video.js' 10const videojs = require('video.js')
11import 'videojs-hotkeys' 11import 'videojs-hotkeys'
12import { Hotkey, HotkeysService } from 'angular2-hotkeys' 12import { Hotkey, HotkeysService } from 'angular2-hotkeys'
13import * as WebTorrent from 'webtorrent' 13import * as WebTorrent from 'webtorrent'
@@ -45,7 +45,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
45 @ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent 45 @ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent
46 @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent 46 @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
47 47
48 player: videojs.Player 48 player: any
49 playerElement: HTMLVideoElement 49 playerElement: HTMLVideoElement
50 userRating: UserVideoRateType = null 50 userRating: UserVideoRateType = null
51 video: VideoDetails = null 51 video: VideoDetails = null
@@ -435,7 +435,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
435 this.zone.runOutsideAngular(async () => { 435 this.zone.runOutsideAngular(async () => {
436 videojs(this.playerElement, videojsOptions, function () { 436 videojs(this.playerElement, videojsOptions, function () {
437 self.player = this 437 self.player = this
438 this.on('customError', (event, data) => self.handleError(data.err)) 438 this.on('customError', (data: any) => self.handleError(data.err))
439 439
440 addContextMenu(self.player, self.video.embedUrl) 440 addContextMenu(self.player, self.video.embedUrl)
441 }) 441 })
@@ -448,7 +448,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
448 this.checkUserRating() 448 this.checkUserRating()
449 } 449 }
450 450
451 private setRating (nextRating) { 451 private setRating (nextRating: string) {
452 let method 452 let method
453 switch (nextRating) { 453 switch (nextRating) {
454 case 'like': 454 case 'like':
@@ -466,11 +466,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
466 .subscribe( 466 .subscribe(
467 () => { 467 () => {
468 // Update the video like attribute 468 // Update the video like attribute
469 this.updateVideoRating(this.userRating, nextRating) 469 this.updateVideoRating(this.userRating, nextRating as VideoRateType)
470 this.userRating = nextRating 470 this.userRating = nextRating as UserVideoRateType
471 }, 471 },
472 472
473 err => this.notificationsService.error(this.i18n('Error'), err.message) 473 (err: any) => this.notificationsService.error(this.i18n('Error'), err.message)
474 ) 474 )
475 } 475 }
476 476