From d6ca951b3cc7cb19ad9f52249444fc68c5d81d50 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Aug 2018 10:05:54 +0200 Subject: [PATCH] Fix user create daily quota component --- .../users/user-edit/user-create.component.ts | 6 ++++-- .../users/user-edit/user-edit.component.html | 14 ++++++++------ .../users/user-edit/user-edit.component.scss | 2 ++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/users/user-edit/user-create.component.ts index c15cfb267..25c060344 100644 --- a/client/src/app/+admin/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/users/user-edit/user-create.component.ts @@ -32,7 +32,8 @@ export class UserCreateComponent extends UserEdit implements OnInit { ngOnInit () { const defaultValues = { role: UserRole.USER.toString(), - videoQuota: '-1' + videoQuota: '-1', + videoQuotaDaily: '-1' } this.buildForm({ @@ -40,7 +41,8 @@ export class UserCreateComponent extends UserEdit implements OnInit { email: this.userValidatorsService.USER_EMAIL, password: this.userValidatorsService.USER_PASSWORD, role: this.userValidatorsService.USER_ROLE, - videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA + videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, + videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY }, defaultValues) } diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html index bb745d6aa..56cf7d17d 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.html +++ b/client/src/app/+admin/users/user-edit/user-edit.component.html @@ -61,7 +61,14 @@ - + +
+ Transcoding is enabled on server. The video quota only take in account original video.
+ At most, this user could use ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}. +
+ + +
- -
- Transcoding is enabled on server. The video quota only take in account original video.
- At most, this user could use ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}. -
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.scss b/client/src/app/+admin/users/user-edit/user-edit.component.scss index b74604e3b..6675f65cc 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.scss +++ b/client/src/app/+admin/users/user-edit/user-edit.component.scss @@ -17,6 +17,8 @@ input:not([type=submit]) { input[type=submit] { @include peertube-button; @include orange-button; + + margin-top: 10px; } .transcoding-information { -- 2.25.1