diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-settings.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index 4800be24b..a9a150e21 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |||
@@ -41,14 +41,12 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
41 | () => { | 41 | () => { |
42 | if (this.user.videoQuota !== -1) { | 42 | if (this.user.videoQuota !== -1) { |
43 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() | 43 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() |
44 | this.userVideoQuotaPercentage = this.user.videoQuota * 100 / this.userVideoQuotaUsed | ||
45 | } else { | 44 | } else { |
46 | this.userVideoQuota = this.i18n('Unlimited') | 45 | this.userVideoQuota = this.i18n('Unlimited') |
47 | } | 46 | } |
48 | 47 | ||
49 | if (this.user.videoQuotaDaily !== -1) { | 48 | if (this.user.videoQuotaDaily !== -1) { |
50 | this.userVideoQuotaDaily = new BytesPipe().transform(this.user.videoQuotaDaily, 0).toString() | 49 | this.userVideoQuotaDaily = new BytesPipe().transform(this.user.videoQuotaDaily, 0).toString() |
51 | this.userVideoQuotaDailyPercentage = this.user.videoQuotaDaily * 100 / this.userVideoQuotaUsedDaily | ||
52 | } else { | 50 | } else { |
53 | this.userVideoQuotaDaily = this.i18n('Unlimited') | 51 | this.userVideoQuotaDaily = this.i18n('Unlimited') |
54 | } | 52 | } |
@@ -58,7 +56,10 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
58 | this.userService.getMyVideoQuotaUsed() | 56 | this.userService.getMyVideoQuotaUsed() |
59 | .subscribe(data => { | 57 | .subscribe(data => { |
60 | this.userVideoQuotaUsed = data.videoQuotaUsed | 58 | this.userVideoQuotaUsed = data.videoQuotaUsed |
59 | this.userVideoQuotaPercentage = this.userVideoQuotaUsed * 100 / this.user.videoQuota | ||
60 | |||
61 | this.userVideoQuotaUsedDaily = data.videoQuotaUsedDaily | 61 | this.userVideoQuotaUsedDaily = data.videoQuotaUsedDaily |
62 | this.userVideoQuotaDailyPercentage = this.userVideoQuotaUsedDaily * 100 / this.user.videoQuotaDaily | ||
62 | }) | 63 | }) |
63 | } | 64 | } |
64 | 65 | ||