aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config/shared/config.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/config/shared/config.service.ts')
-rw-r--r--client/src/app/+admin/config/shared/config.service.ts38
1 files changed, 18 insertions, 20 deletions
diff --git a/client/src/app/+admin/config/shared/config.service.ts b/client/src/app/+admin/config/shared/config.service.ts
index f182946b8..5f98aa545 100644
--- a/client/src/app/+admin/config/shared/config.service.ts
+++ b/client/src/app/+admin/config/shared/config.service.ts
@@ -2,7 +2,6 @@ import { catchError } from 'rxjs/operators'
2import { HttpClient } from '@angular/common/http' 2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { I18n } from '@ngx-translate/i18n-polyfill'
6import { CustomConfig } from '@shared/models' 5import { CustomConfig } from '@shared/models'
7import { environment } from '../../../../environments/environment' 6import { environment } from '../../../../environments/environment'
8 7
@@ -15,33 +14,32 @@ export class ConfigService {
15 14
16 constructor ( 15 constructor (
17 private authHttp: HttpClient, 16 private authHttp: HttpClient,
18 private restExtractor: RestExtractor, 17 private restExtractor: RestExtractor
19 private i18n: I18n 18 ) {
20 ) {
21 this.videoQuotaOptions = [ 19 this.videoQuotaOptions = [
22 { value: undefined, label: 'Default quota', disabled: true }, 20 { value: undefined, label: 'Default quota', disabled: true },
23 { value: -1, label: this.i18n('Unlimited') }, 21 { value: -1, label: $localize`Unlimited` },
24 { value: undefined, label: '─────', disabled: true }, 22 { value: undefined, label: '─────', disabled: true },
25 { value: 0, label: this.i18n('None - no upload possible') }, 23 { value: 0, label: $localize`None - no upload possible` },
26 { value: 100 * 1024 * 1024, label: this.i18n('100MB') }, 24 { value: 100 * 1024 * 1024, label: $localize`100MB` },
27 { value: 500 * 1024 * 1024, label: this.i18n('500MB') }, 25 { value: 500 * 1024 * 1024, label: $localize`500MB` },
28 { value: 1024 * 1024 * 1024, label: this.i18n('1GB') }, 26 { value: 1024 * 1024 * 1024, label: $localize`1GB` },
29 { value: 5 * 1024 * 1024 * 1024, label: this.i18n('5GB') }, 27 { value: 5 * 1024 * 1024 * 1024, label: $localize`5GB` },
30 { value: 20 * 1024 * 1024 * 1024, label: this.i18n('20GB') }, 28 { value: 20 * 1024 * 1024 * 1024, label: $localize`20GB` },
31 { value: 50 * 1024 * 1024 * 1024, label: this.i18n('50GB') } 29 { value: 50 * 1024 * 1024 * 1024, label: $localize`50GB` }
32 ] 30 ]
33 31
34 this.videoQuotaDailyOptions = [ 32 this.videoQuotaDailyOptions = [
35 { value: undefined, label: 'Default daily upload limit', disabled: true }, 33 { value: undefined, label: 'Default daily upload limit', disabled: true },
36 { value: -1, label: this.i18n('Unlimited') }, 34 { value: -1, label: $localize`Unlimited` },
37 { value: undefined, label: '─────', disabled: true }, 35 { value: undefined, label: '─────', disabled: true },
38 { value: 0, label: this.i18n('None - no upload possible') }, 36 { value: 0, label: $localize`None - no upload possible` },
39 { value: 10 * 1024 * 1024, label: this.i18n('10MB') }, 37 { value: 10 * 1024 * 1024, label: $localize`10MB` },
40 { value: 50 * 1024 * 1024, label: this.i18n('50MB') }, 38 { value: 50 * 1024 * 1024, label: $localize`50MB` },
41 { value: 100 * 1024 * 1024, label: this.i18n('100MB') }, 39 { value: 100 * 1024 * 1024, label: $localize`100MB` },
42 { value: 500 * 1024 * 1024, label: this.i18n('500MB') }, 40 { value: 500 * 1024 * 1024, label: $localize`500MB` },
43 { value: 2 * 1024 * 1024 * 1024, label: this.i18n('2GB') }, 41 { value: 2 * 1024 * 1024 * 1024, label: $localize`2GB` },
44 { value: 5 * 1024 * 1024 * 1024, label: this.i18n('5GB') } 42 { value: 5 * 1024 * 1024 * 1024, label: $localize`5GB` }
45 ] 43 ]
46 } 44 }
47 45