diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-13 01:29:11 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-13 01:43:52 +0100 |
commit | df8914c9a2d6dbb435460b9e252a771cac47880b (patch) | |
tree | 7413eaf0012ed91354a1471f1252e09cf7685bb6 /client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |
parent | c547bbf96a46166c4b4548413b092c58f7b0e37a (diff) | |
download | PeerTube-df8914c9a2d6dbb435460b9e252a771cac47880b.tar.gz PeerTube-df8914c9a2d6dbb435460b9e252a771cac47880b.tar.zst PeerTube-df8914c9a2d6dbb435460b9e252a771cac47880b.zip |
More modern avatar upload, quota represented with progress bars
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 | 4 |
1 files changed, 4 insertions, 0 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 ada98401c..5f2db9854 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 | |||
@@ -17,9 +17,11 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
17 | 17 | ||
18 | userVideoQuota = '0' | 18 | userVideoQuota = '0' |
19 | userVideoQuotaUsed = 0 | 19 | userVideoQuotaUsed = 0 |
20 | userVideoQuotaPercentage = 15 | ||
20 | 21 | ||
21 | userVideoQuotaDaily = '0' | 22 | userVideoQuotaDaily = '0' |
22 | userVideoQuotaUsedDaily = 0 | 23 | userVideoQuotaUsedDaily = 0 |
24 | userVideoQuotaDailyPercentage = 15 | ||
23 | 25 | ||
24 | constructor ( | 26 | constructor ( |
25 | private viewportScroller: ViewportScroller, | 27 | private viewportScroller: ViewportScroller, |
@@ -40,12 +42,14 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
40 | () => { | 42 | () => { |
41 | if (this.user.videoQuota !== -1) { | 43 | if (this.user.videoQuota !== -1) { |
42 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() | 44 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() |
45 | this.userVideoQuotaPercentage = this.user.videoQuota * 100 / this.userVideoQuotaUsed | ||
43 | } else { | 46 | } else { |
44 | this.userVideoQuota = this.i18n('Unlimited') | 47 | this.userVideoQuota = this.i18n('Unlimited') |
45 | } | 48 | } |
46 | 49 | ||
47 | if (this.user.videoQuotaDaily !== -1) { | 50 | if (this.user.videoQuotaDaily !== -1) { |
48 | this.userVideoQuotaDaily = new BytesPipe().transform(this.user.videoQuotaDaily, 0).toString() | 51 | this.userVideoQuotaDaily = new BytesPipe().transform(this.user.videoQuotaDaily, 0).toString() |
52 | this.userVideoQuotaDailyPercentage = this.user.videoQuotaDaily * 100 / this.userVideoQuotaUsedDaily | ||
49 | } else { | 53 | } else { |
50 | this.userVideoQuotaDaily = this.i18n('Unlimited') | 54 | this.userVideoQuotaDaily = this.i18n('Unlimited') |
51 | } | 55 | } |