import { Subject } from 'rxjs'
-import { BytesPipe } from 'ngx-pipes'
import { Component, Input, OnInit } from '@angular/core'
import { User, UserService } from '@app/core'
-import { I18n } from '@ngx-translate/i18n-polyfill'
+import { BytesPipe } from '../angular'
@Component({
selector: 'my-user-quota',
templateUrl: './user-quota.component.html',
- styleUrls: ['./user-quota.component.scss']
+ styleUrls: [ './user-quota.component.scss' ]
})
export class UserQuotaComponent implements OnInit {
userVideoQuotaUsedDaily = 0
userVideoQuotaDailyPercentage = 15
- constructor (
- private userService: UserService,
- private i18n: I18n
- ) { }
+ constructor (private userService: UserService) { }
ngOnInit () {
this.userInformationLoaded.subscribe(
if (this.user.videoQuota !== -1) {
this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString()
} else {
- this.userVideoQuota = this.i18n('Unlimited')
+ this.userVideoQuota = $localize`Unlimited`
}
if (this.user.videoQuotaDaily !== -1) {
this.userVideoQuotaDaily = new BytesPipe().transform(this.user.videoQuotaDaily, 0).toString()
} else {
- this.userVideoQuotaDaily = this.i18n('Unlimited')
+ this.userVideoQuotaDaily = $localize`Unlimited`
}
}
)