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 --- .../account-details/account-details.component.html | 19 +++++++++++++------ .../account-details/account-details.component.scss | 6 ++++++ .../account-details/account-details.component.ts | 6 +++--- 3 files changed, 22 insertions(+), 9 deletions(-) (limited to 'client/src/app/account/account-settings/account-details') diff --git a/client/src/app/account/account-settings/account-details/account-details.component.html b/client/src/app/account/account-settings/account-details/account-details.component.html index 8f1475a4d..9dcc66a75 100644 --- a/client/src/app/account/account-settings/account-details/account-details.component.html +++ b/client/src/app/account/account-settings/account-details/account-details.component.html @@ -1,11 +1,18 @@
- - - + + + +
+ +
+
+ {{ formErrors.nsfwPolicy }} +
diff --git a/client/src/app/account/account-settings/account-details/account-details.component.scss b/client/src/app/account/account-settings/account-details/account-details.component.scss index 4e8dfde1d..ed59e4689 100644 --- a/client/src/app/account/account-settings/account-details/account-details.component.scss +++ b/client/src/app/account/account-settings/account-details/account-details.component.scss @@ -12,3 +12,9 @@ input[type=submit] { display: block; margin-top: 15px; } + +.peertube-select-container { + @include peertube-select-container(340px); + + margin-bottom: 30px; +} \ No newline at end of file diff --git a/client/src/app/account/account-settings/account-details/account-details.component.ts b/client/src/app/account/account-settings/account-details/account-details.component.ts index 917f31651..de213717e 100644 --- a/client/src/app/account/account-settings/account-details/account-details.component.ts +++ b/client/src/app/account/account-settings/account-details/account-details.component.ts @@ -29,7 +29,7 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { buildForm () { this.form = this.formBuilder.group({ - displayNSFW: [ this.user.displayNSFW ], + nsfwPolicy: [ this.user.nsfwPolicy ], autoPlayVideo: [ this.user.autoPlayVideo ] }) @@ -41,10 +41,10 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { } updateDetails () { - const displayNSFW = this.form.value['displayNSFW'] + const nsfwPolicy = this.form.value['nsfwPolicy'] const autoPlayVideo = this.form.value['autoPlayVideo'] const details: UserUpdateMe = { - displayNSFW, + nsfwPolicy, autoPlayVideo } -- cgit v1.2.3