diff options
Diffstat (limited to 'client/src/app/+my-account/shared/actor-avatar-info.component.ts')
-rw-r--r-- | client/src/app/+my-account/shared/actor-avatar-info.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
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..72c815a0c 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,8 +1,8 @@ | |||
1 | import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core' |
2 | import { ServerService } from '../../core/server' | 2 | import { ServerService } from '../../core/server' |
3 | import { NotificationsService } from 'angular2-notifications' | ||
4 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 3 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
5 | import { Account } from '@app/shared/account/account.model' | 4 | import { Account } from '@app/shared/account/account.model' |
5 | import { Notifier } from '@app/core' | ||
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-actor-avatar-info', | 8 | selector: 'my-actor-avatar-info', |
@@ -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 | }) |
12 | export class ActorAvatarInfoComponent { | 12 | export class ActorAvatarInfoComponent { |
13 | @ViewChild('avatarfileInput') avatarfileInput | 13 | @ViewChild('avatarfileInput') avatarfileInput: ElementRef<HTMLInputElement> |
14 | 14 | ||
15 | @Input() actor: VideoChannel | Account | 15 | @Input() actor: VideoChannel | Account |
16 | 16 | ||
@@ -18,13 +18,13 @@ export class ActorAvatarInfoComponent { | |||
18 | 18 | ||
19 | constructor ( | 19 | constructor ( |
20 | private serverService: ServerService, | 20 | private serverService: ServerService, |
21 | private notificationsService: NotificationsService | 21 | private notifier: Notifier |
22 | ) {} | 22 | ) {} |
23 | 23 | ||
24 | onAvatarChange () { | 24 | onAvatarChange () { |
25 | const avatarfile = this.avatarfileInput.nativeElement.files[ 0 ] | 25 | const avatarfile = this.avatarfileInput.nativeElement.files[ 0 ] |
26 | if (avatarfile.size > this.maxAvatarSize) { | 26 | if (avatarfile.size > this.maxAvatarSize) { |
27 | this.notificationsService.error('Error', 'This image is too large.') | 27 | this.notifier.error('Error', 'This image is too large.') |
28 | return | 28 | return |
29 | } | 29 | } |
30 | 30 | ||