From 01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Jan 2018 11:10:40 +0100 Subject: Add avatar max size limit --- .../account/account-settings/account-settings.component.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'client/src/app/account/account-settings/account-settings.component.ts') 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 @@ -import { HttpEventType, HttpResponse } from '@angular/common/http' import { Component, OnInit, ViewChild } from '@angular/core' import { NotificationsService } from 'angular2-notifications' -import { VideoPrivacy } from '../../../../../shared/models/videos' -import { User } from '../../shared' import { AuthService } from '../../core' +import { ServerService } from '../../core/server' +import { User } from '../../shared' import { UserService } from '../../shared/users' @Component({ @@ -19,6 +18,7 @@ export class AccountSettingsComponent implements OnInit { constructor ( private userService: UserService, private authService: AuthService, + private serverService: ServerService, private notificationsService: NotificationsService ) {} @@ -47,4 +47,12 @@ export class AccountSettingsComponent implements OnInit { err => this.notificationsService.error('Error', err.message) ) } + + get maxAvatarSize () { + return this.serverService.getConfig().avatar.file.size.max + } + + get avatarExtensions () { + return this.serverService.getConfig().avatar.file.extensions.join(',') + } } -- cgit v1.2.3