X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Foverview%2Fusers%2Fuser-edit%2Fuser-edit.ts;h=0ba517edbb1c8d66baf97d18698db487cb8c3cfe;hb=f67ac646a2c081e02b28a7ab1dc856db6ee20e2f;hp=395d0742370142d248e46eb7c16e27171f10a244;hpb=b0d6a800f84ac16fe541b1f098defe862d09069a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/overview/users/user-edit/user-edit.ts b/client/src/app/+admin/overview/users/user-edit/user-edit.ts index 395d07423..0ba517edb 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-edit.ts @@ -60,33 +60,14 @@ export abstract class UserEdit extends FormReactive implements OnInit { ] } - isTranscodingInformationDisplayed () { - const formVideoQuota = parseInt(this.form.value['videoQuota'], 10) - - return this.serverConfig.transcoding.enabledResolutions.length !== 0 && - formVideoQuota > 0 - } - - computeQuotaWithTranscoding () { - const transcodingConfig = this.serverConfig.transcoding - - const resolutions = transcodingConfig.enabledResolutions - const higherResolution = VideoResolution.H_4K - let multiplier = 0 - - for (const resolution of resolutions) { - multiplier += resolution / higherResolution - } - - if (transcodingConfig.hls.enabled) multiplier *= 2 - - return multiplier * parseInt(this.form.value['videoQuota'], 10) - } - resetPassword () { return } + getUserVideoQuota () { + return this.form.value['videoQuota'] + } + protected buildAdminFlags (formValue: any) { return formValue.byPassAutoBlock ? UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST : UserAdminFlag.NONE }