From 0883b3245bf0deb9106c4041e9afbd3521b79280 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Apr 2018 11:01:34 +0200 Subject: Add ability to choose what policy we have for NSFW videos There is a global instance setting and a per user setting --- .../edit-custom-config/edit-custom-config.component.html | 16 ++++++++++++++++ .../edit-custom-config/edit-custom-config.component.ts | 4 ++++ 2 files changed, 20 insertions(+) (limited to 'client/src/app/+admin/config') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 714a3af15..df40bba9f 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -62,6 +62,22 @@ +
+ + + +
+ +
+
+ {{ formErrors.instanceDefaultNSFWPolicy }} +
+
+
Cache
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 d73ee71e4..2ab371cbb 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 @@ -48,6 +48,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { instanceDescription: '', instanceTerms: '', instanceDefaultClientRoute: '', + instanceDefaultNSFWPolicy: '', cachePreviewsSize: '', signupLimit: '', adminEmail: '', @@ -90,6 +91,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { instanceDescription: [ '' ], instanceTerms: [ '' ], instanceDefaultClientRoute: [ '' ], + instanceDefaultNSFWPolicy: [ '' ], cachePreviewsSize: [ '', CACHE_PREVIEWS_SIZE.VALIDATORS ], signupEnabled: [ ], signupLimit: [ '', SIGNUP_LIMIT.VALIDATORS ], @@ -167,6 +169,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { description: this.form.value['instanceDescription'], terms: this.form.value['instanceTerms'], defaultClientRoute: this.form.value['instanceDefaultClientRoute'], + defaultNSFWPolicy: this.form.value['instanceDefaultNSFWPolicy'], customizations: { javascript: this.form.value['customizationJavascript'], css: this.form.value['customizationCSS'] @@ -224,6 +227,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { instanceDescription: this.customConfig.instance.description, instanceTerms: this.customConfig.instance.terms, instanceDefaultClientRoute: this.customConfig.instance.defaultClientRoute, + instanceDefaultNSFWPolicy: this.customConfig.instance.defaultNSFWPolicy, cachePreviewsSize: this.customConfig.cache.previews.size, signupEnabled: this.customConfig.signup.enabled, signupLimit: this.customConfig.signup.limit, -- cgit v1.2.3