diff options
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 2ab371cbb..a1e334a74 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -8,7 +8,7 @@ import { FormReactive, USER_VIDEO_QUOTA } from '@app/shared' | |||
8 | import { | 8 | import { |
9 | ADMIN_EMAIL, | 9 | ADMIN_EMAIL, |
10 | CACHE_PREVIEWS_SIZE, | 10 | CACHE_PREVIEWS_SIZE, |
11 | INSTANCE_NAME, INSTANCE_SHORT_DESCRIPTION, | 11 | INSTANCE_NAME, INSTANCE_SHORT_DESCRIPTION, SERVICES_TWITTER_USERNAME, |
12 | SIGNUP_LIMIT, | 12 | SIGNUP_LIMIT, |
13 | TRANSCODING_THREADS | 13 | TRANSCODING_THREADS |
14 | } from '@app/shared/forms/form-validators/custom-config' | 14 | } from '@app/shared/forms/form-validators/custom-config' |
@@ -49,6 +49,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
49 | instanceTerms: '', | 49 | instanceTerms: '', |
50 | instanceDefaultClientRoute: '', | 50 | instanceDefaultClientRoute: '', |
51 | instanceDefaultNSFWPolicy: '', | 51 | instanceDefaultNSFWPolicy: '', |
52 | servicesTwitterUsername: '', | ||
52 | cachePreviewsSize: '', | 53 | cachePreviewsSize: '', |
53 | signupLimit: '', | 54 | signupLimit: '', |
54 | adminEmail: '', | 55 | adminEmail: '', |
@@ -60,6 +61,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
60 | validationMessages = { | 61 | validationMessages = { |
61 | instanceShortDescription: INSTANCE_SHORT_DESCRIPTION.MESSAGES, | 62 | instanceShortDescription: INSTANCE_SHORT_DESCRIPTION.MESSAGES, |
62 | instanceName: INSTANCE_NAME.MESSAGES, | 63 | instanceName: INSTANCE_NAME.MESSAGES, |
64 | servicesTwitterUsername: SERVICES_TWITTER_USERNAME, | ||
63 | cachePreviewsSize: CACHE_PREVIEWS_SIZE.MESSAGES, | 65 | cachePreviewsSize: CACHE_PREVIEWS_SIZE.MESSAGES, |
64 | signupLimit: SIGNUP_LIMIT.MESSAGES, | 66 | signupLimit: SIGNUP_LIMIT.MESSAGES, |
65 | adminEmail: ADMIN_EMAIL.MESSAGES, | 67 | adminEmail: ADMIN_EMAIL.MESSAGES, |
@@ -92,6 +94,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
92 | instanceTerms: [ '' ], | 94 | instanceTerms: [ '' ], |
93 | instanceDefaultClientRoute: [ '' ], | 95 | instanceDefaultClientRoute: [ '' ], |
94 | instanceDefaultNSFWPolicy: [ '' ], | 96 | instanceDefaultNSFWPolicy: [ '' ], |
97 | servicesTwitterUsername: [ '', SERVICES_TWITTER_USERNAME.VALIDATORS ], | ||
98 | servicesTwitterWhitelisted: [ ], | ||
95 | cachePreviewsSize: [ '', CACHE_PREVIEWS_SIZE.VALIDATORS ], | 99 | cachePreviewsSize: [ '', CACHE_PREVIEWS_SIZE.VALIDATORS ], |
96 | signupEnabled: [ ], | 100 | signupEnabled: [ ], |
97 | signupLimit: [ '', SIGNUP_LIMIT.VALIDATORS ], | 101 | signupLimit: [ '', SIGNUP_LIMIT.VALIDATORS ], |
@@ -175,6 +179,12 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
175 | css: this.form.value['customizationCSS'] | 179 | css: this.form.value['customizationCSS'] |
176 | } | 180 | } |
177 | }, | 181 | }, |
182 | services: { | ||
183 | twitter: { | ||
184 | username: this.form.value['servicesTwitterUsername'], | ||
185 | whitelisted: this.form.value['servicesTwitterWhitelisted'] | ||
186 | } | ||
187 | }, | ||
178 | cache: { | 188 | cache: { |
179 | previews: { | 189 | previews: { |
180 | size: this.form.value['cachePreviewsSize'] | 190 | size: this.form.value['cachePreviewsSize'] |
@@ -228,6 +238,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
228 | instanceTerms: this.customConfig.instance.terms, | 238 | instanceTerms: this.customConfig.instance.terms, |
229 | instanceDefaultClientRoute: this.customConfig.instance.defaultClientRoute, | 239 | instanceDefaultClientRoute: this.customConfig.instance.defaultClientRoute, |
230 | instanceDefaultNSFWPolicy: this.customConfig.instance.defaultNSFWPolicy, | 240 | instanceDefaultNSFWPolicy: this.customConfig.instance.defaultNSFWPolicy, |
241 | servicesTwitterUsername: this.customConfig.services.twitter.username, | ||
242 | servicesTwitterWhitelisted: this.customConfig.services.twitter.whitelisted, | ||
231 | cachePreviewsSize: this.customConfig.cache.previews.size, | 243 | cachePreviewsSize: this.customConfig.cache.previews.size, |
232 | signupEnabled: this.customConfig.signup.enabled, | 244 | signupEnabled: this.customConfig.signup.enabled, |
233 | signupLimit: this.customConfig.signup.limit, | 245 | signupLimit: this.customConfig.signup.limit, |