X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Faccount%2Factor-avatar-info.component.ts;h=5daa54cb59c208806d156350a3c8a02b3d0ab253;hb=c07fac202dba3fed69aace74157589c21d732be6;hp=1389218ccc392fca316648090547fb218048219e;hpb=94676e631c5045144da598fefbefaa3cfcaaeb0d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts b/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts index 1389218cc..5daa54cb5 100644 --- a/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts +++ b/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts @@ -1,8 +1,9 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' import { Notifier, ServerService } from '@app/core' -import { Account, BytesPipe, VideoChannel } from '@app/shared/shared-main' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { getBytes } from '@root-helpers/bytes' import { ServerConfig } from '@shared/models' +import { VideoChannel } from '../video-channel/video-channel.model' +import { Account } from '../account/account.model' @Component({ selector: 'my-actor-avatar-info', @@ -19,15 +20,12 @@ export class ActorAvatarInfoComponent implements OnInit { maxSizeText: string private serverConfig: ServerConfig - private bytesPipe: BytesPipe constructor ( private serverService: ServerService, - private notifier: Notifier, - private i18n: I18n + private notifier: Notifier ) { - this.bytesPipe = new BytesPipe() - this.maxSizeText = this.i18n('max size') + this.maxSizeText = $localize`max size` } ngOnInit (): void { @@ -54,7 +52,7 @@ export class ActorAvatarInfoComponent implements OnInit { } get maxAvatarSizeInBytes () { - return this.bytesPipe.transform(this.maxAvatarSize) + return getBytes(this.maxAvatarSize) } get avatarExtensions () {