aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/account/account-settings/account-settings.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 11:10:40 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 11:10:40 +0100
commit01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea (patch)
tree9e01809f09adbcd512a8dedf73093a123f88e02c /client/src/app/account/account-settings/account-settings.component.ts
parent47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (diff)
downloadPeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.gz
PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.zst
PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.zip
Add avatar max size limit
Diffstat (limited to 'client/src/app/account/account-settings/account-settings.component.ts')
-rw-r--r--client/src/app/account/account-settings/account-settings.component.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/src/app/account/account-settings/account-settings.component.ts b/client/src/app/account/account-settings/account-settings.component.ts
index 3e03085ce..d5f5ff30f 100644
--- a/client/src/app/account/account-settings/account-settings.component.ts
+++ b/client/src/app/account/account-settings/account-settings.component.ts
@@ -1,9 +1,8 @@
1import { HttpEventType, HttpResponse } from '@angular/common/http'
2import { Component, OnInit, ViewChild } from '@angular/core' 1import { Component, OnInit, ViewChild } from '@angular/core'
3import { NotificationsService } from 'angular2-notifications' 2import { NotificationsService } from 'angular2-notifications'
4import { VideoPrivacy } from '../../../../../shared/models/videos'
5import { User } from '../../shared'
6import { AuthService } from '../../core' 3import { AuthService } from '../../core'
4import { ServerService } from '../../core/server'
5import { User } from '../../shared'
7import { UserService } from '../../shared/users' 6import { UserService } from '../../shared/users'
8 7
9@Component({ 8@Component({
@@ -19,6 +18,7 @@ export class AccountSettingsComponent implements OnInit {
19 constructor ( 18 constructor (
20 private userService: UserService, 19 private userService: UserService,
21 private authService: AuthService, 20 private authService: AuthService,
21 private serverService: ServerService,
22 private notificationsService: NotificationsService 22 private notificationsService: NotificationsService
23 ) {} 23 ) {}
24 24
@@ -47,4 +47,12 @@ export class AccountSettingsComponent implements OnInit {
47 err => this.notificationsService.error('Error', err.message) 47 err => this.notificationsService.error('Error', err.message)
48 ) 48 )
49 } 49 }
50
51 get maxAvatarSize () {
52 return this.serverService.getConfig().avatar.file.size.max
53 }
54
55 get avatarExtensions () {
56 return this.serverService.getConfig().avatar.file.extensions.join(',')
57 }
50} 58}