diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:09:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:09:23 +0100 |
commit | b718fd22374d64534bcfe69932cf562894abed6a (patch) | |
tree | 311d3c67e2a4d1f33ebdd1dc163527de9d33d0f7 /client/src/app/+admin/users/user-edit/user-edit.ts | |
parent | adb115f5522bea4d52456a9fc5eb4140bb064476 (diff) | |
parent | 501e961199578129629cf0567033d13efced9904 (diff) | |
download | PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.tar.gz PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.tar.zst PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.zip |
Merge branch 'develop' into pr/1285
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-edit.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-edit.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts index 0b3511e8e..649b35b0c 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/users/user-edit/user-edit.ts | |||
@@ -8,6 +8,7 @@ export abstract class UserEdit extends FormReactive { | |||
8 | videoQuotaDailyOptions: { value: string, label: string }[] = [] | 8 | videoQuotaDailyOptions: { value: string, label: string }[] = [] |
9 | roles = Object.keys(USER_ROLE_LABELS).map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] })) | 9 | roles = Object.keys(USER_ROLE_LABELS).map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] })) |
10 | username: string | 10 | username: string |
11 | userId: number | ||
11 | 12 | ||
12 | protected abstract serverService: ServerService | 13 | protected abstract serverService: ServerService |
13 | protected abstract configService: ConfigService | 14 | protected abstract configService: ConfigService |
@@ -22,7 +23,9 @@ export abstract class UserEdit extends FormReactive { | |||
22 | } | 23 | } |
23 | 24 | ||
24 | computeQuotaWithTranscoding () { | 25 | computeQuotaWithTranscoding () { |
25 | const resolutions = this.serverService.getConfig().transcoding.enabledResolutions | 26 | const transcodingConfig = this.serverService.getConfig().transcoding |
27 | |||
28 | const resolutions = transcodingConfig.enabledResolutions | ||
26 | const higherResolution = VideoResolution.H_1080P | 29 | const higherResolution = VideoResolution.H_1080P |
27 | let multiplier = 0 | 30 | let multiplier = 0 |
28 | 31 | ||
@@ -30,9 +33,15 @@ export abstract class UserEdit extends FormReactive { | |||
30 | multiplier += resolution / higherResolution | 33 | multiplier += resolution / higherResolution |
31 | } | 34 | } |
32 | 35 | ||
36 | if (transcodingConfig.hls.enabled) multiplier *= 2 | ||
37 | |||
33 | return multiplier * parseInt(this.form.value['videoQuota'], 10) | 38 | return multiplier * parseInt(this.form.value['videoQuota'], 10) |
34 | } | 39 | } |
35 | 40 | ||
41 | resetPassword () { | ||
42 | return | ||
43 | } | ||
44 | |||
36 | protected buildQuotaOptions () { | 45 | protected buildQuotaOptions () { |
37 | // These are used by a HTML select, so convert key into strings | 46 | // These are used by a HTML select, so convert key into strings |
38 | this.videoQuotaOptions = this.configService | 47 | this.videoQuotaOptions = this.configService |