aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts6
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts11
-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.ts4
4 files changed, 10 insertions, 14 deletions
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 f2b8a4e26..5d43956f2 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
@@ -1,4 +1,4 @@
1import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
4import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' 4import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
@@ -17,11 +17,9 @@ 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: any
21
22 error: string 20 error: string
23
24 videoChannelToUpdate: VideoChannel 21 videoChannelToUpdate: VideoChannel
22
25 private paramsSub: Subscription 23 private paramsSub: Subscription
26 24
27 constructor ( 25 constructor (
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 52307f09e..2d88ac760 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: any) => this.checkedVideos[ k ] === true) 69 return Object.keys(this.checkedVideos).some(k => 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: any) => this.checkedVideos[ k ] === true) 84 .filter(k => 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,10 +168,9 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
168 } 168 }
169 169
170 private spliceVideosById (id: number) { 170 private spliceVideosById (id: number) {
171 let key: any 171 for (const key of Object.keys(this.loadedPages)) {
172 for (key of Object.keys(this.loadedPages)) { 172 const videos: Video[] = 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)
175 174
176 if (index !== -1) { 175 if (index !== -1) {
177 videos.splice(index, 1) 176 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 eb3f9404f..9f94f3c13 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,8 +49,7 @@ 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 // TODO: typing 52 search (event: { query: string }) {
53 search (event: any) {
54 const query = event.query 53 const query = event.query
55 this.userService.autocomplete(query) 54 this.userService.autocomplete(query)
56 .subscribe( 55 .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 b4505a7f2..54bacc212 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
@@ -1,4 +1,4 @@
1import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core' 1import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core'
2import { ServerService } from '../../core/server' 2import { ServerService } from '../../core/server'
3import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
4import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 4import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
@@ -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: any 13 @ViewChild('avatarfileInput') avatarfileInput: ElementRef<HTMLInputElement>
14 14
15 @Input() actor: VideoChannel | Account 15 @Input() actor: VideoChannel | Account
16 16