aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-28 01:17:48 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-06-28 01:17:59 +0200
commit287124d110391959462b60b45ebbfe90db3a1e40 (patch)
tree74adaa215dacbdae25a0e1bb9ba898d515250198 /client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
parent0242861ece7495c8e726871f9a5f4a3683712bb0 (diff)
downloadPeerTube-287124d110391959462b60b45ebbfe90db3a1e40.tar.gz
PeerTube-287124d110391959462b60b45ebbfe90db3a1e40.tar.zst
PeerTube-287124d110391959462b60b45ebbfe90db3a1e40.zip
fix quota representation in profile settings
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.ts5
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