aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-19 11:01:34 +0200
committerChocobozzz <me@florianbigard.com>2018-04-19 11:01:34 +0200
commit0883b3245bf0deb9106c4041e9afbd3521b79280 (patch)
treefcb73005e0b31a3b763ee5d22d5fc39c2da89907 /client/src/app/+admin
parent04ed10b21e8e1339514faae0bb690e4d97c23b0a (diff)
downloadPeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.tar.gz
PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.tar.zst
PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.zip
Add ability to choose what policy we have for NSFW videos
There is a global instance setting and a per user setting
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html16
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts4
2 files changed, 20 insertions, 0 deletions
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 @@
62 </div> 62 </div>
63 </div> 63 </div>
64 64
65 <div class="form-group">
66 <label for="instanceDefaultNSFWPolicy">Policy on videos containing sensitive content</label>
67 <my-help helpType="custom" customHtml="With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video."></my-help>
68
69 <div class="peertube-select-container">
70 <select id="instanceDefaultNSFWPolicy" formControlName="instanceDefaultNSFWPolicy">
71 <option value="do_not_list">Do not list</option>
72 <option value="blur">Blur thumbnails</option>
73 <option value="display">Display</option>
74 </select>
75 </div>
76 <div *ngIf="formErrors.instanceDefaultNSFWPolicy" class="form-error">
77 {{ formErrors.instanceDefaultNSFWPolicy }}
78 </div>
79 </div>
80
65 <div class="inner-form-title">Cache</div> 81 <div class="inner-form-title">Cache</div>
66 82
67 <div class="form-group"> 83 <div class="form-group">
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 {
48 instanceDescription: '', 48 instanceDescription: '',
49 instanceTerms: '', 49 instanceTerms: '',
50 instanceDefaultClientRoute: '', 50 instanceDefaultClientRoute: '',
51 instanceDefaultNSFWPolicy: '',
51 cachePreviewsSize: '', 52 cachePreviewsSize: '',
52 signupLimit: '', 53 signupLimit: '',
53 adminEmail: '', 54 adminEmail: '',
@@ -90,6 +91,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
90 instanceDescription: [ '' ], 91 instanceDescription: [ '' ],
91 instanceTerms: [ '' ], 92 instanceTerms: [ '' ],
92 instanceDefaultClientRoute: [ '' ], 93 instanceDefaultClientRoute: [ '' ],
94 instanceDefaultNSFWPolicy: [ '' ],
93 cachePreviewsSize: [ '', CACHE_PREVIEWS_SIZE.VALIDATORS ], 95 cachePreviewsSize: [ '', CACHE_PREVIEWS_SIZE.VALIDATORS ],
94 signupEnabled: [ ], 96 signupEnabled: [ ],
95 signupLimit: [ '', SIGNUP_LIMIT.VALIDATORS ], 97 signupLimit: [ '', SIGNUP_LIMIT.VALIDATORS ],
@@ -167,6 +169,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
167 description: this.form.value['instanceDescription'], 169 description: this.form.value['instanceDescription'],
168 terms: this.form.value['instanceTerms'], 170 terms: this.form.value['instanceTerms'],
169 defaultClientRoute: this.form.value['instanceDefaultClientRoute'], 171 defaultClientRoute: this.form.value['instanceDefaultClientRoute'],
172 defaultNSFWPolicy: this.form.value['instanceDefaultNSFWPolicy'],
170 customizations: { 173 customizations: {
171 javascript: this.form.value['customizationJavascript'], 174 javascript: this.form.value['customizationJavascript'],
172 css: this.form.value['customizationCSS'] 175 css: this.form.value['customizationCSS']
@@ -224,6 +227,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
224 instanceDescription: this.customConfig.instance.description, 227 instanceDescription: this.customConfig.instance.description,
225 instanceTerms: this.customConfig.instance.terms, 228 instanceTerms: this.customConfig.instance.terms,
226 instanceDefaultClientRoute: this.customConfig.instance.defaultClientRoute, 229 instanceDefaultClientRoute: this.customConfig.instance.defaultClientRoute,
230 instanceDefaultNSFWPolicy: this.customConfig.instance.defaultNSFWPolicy,
227 cachePreviewsSize: this.customConfig.cache.previews.size, 231 cachePreviewsSize: this.customConfig.cache.previews.size,
228 signupEnabled: this.customConfig.signup.enabled, 232 signupEnabled: this.customConfig.signup.enabled,
229 signupLimit: this.customConfig.signup.limit, 233 signupLimit: this.customConfig.signup.limit,