diff options
Diffstat (limited to 'client/src/app/account')
5 files changed, 25 insertions, 10 deletions
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..0e8598e9e 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,15 @@ | |||
1 | <form role="form" (ngSubmit)="updateDetails()" [formGroup]="form"> | 1 | <form role="form" (ngSubmit)="updateDetails()" [formGroup]="form"> |
2 | <div class="form-group"> | 2 | <div class="form-group"> |
3 | <input | 3 | <label for="nsfwPolicy">Default policy on videos containing sensitive content</label> |
4 | type="checkbox" id="displayNSFW" | 4 | <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> |
5 | formControlName="displayNSFW" | 5 | |
6 | > | 6 | <div class="peertube-select-container"> |
7 | <label for="displayNSFW"></label> | 7 | <select id="nsfwPolicy" formControlName="nsfwPolicy"> |
8 | <label for="displayNSFW">Display videos that contain mature or explicit content</label> | 8 | <option value="do_not_list">Do not list</option> |
9 | <option value="blur">Blur thumbnails</option> | ||
10 | <option value="display">Display</option> | ||
11 | </select> | ||
12 | </div> | ||
9 | </div> | 13 | </div> |
10 | 14 | ||
11 | <div class="form-group"> | 15 | <div class="form-group"> |
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] { | |||
12 | display: block; | 12 | display: block; |
13 | margin-top: 15px; | 13 | margin-top: 15px; |
14 | } | 14 | } |
15 | |||
16 | .peertube-select-container { | ||
17 | @include peertube-select-container(340px); | ||
18 | |||
19 | margin-bottom: 30px; | ||
20 | } \ 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 { | |||
29 | 29 | ||
30 | buildForm () { | 30 | buildForm () { |
31 | this.form = this.formBuilder.group({ | 31 | this.form = this.formBuilder.group({ |
32 | displayNSFW: [ this.user.displayNSFW ], | 32 | nsfwPolicy: [ this.user.nsfwPolicy ], |
33 | autoPlayVideo: [ this.user.autoPlayVideo ] | 33 | autoPlayVideo: [ this.user.autoPlayVideo ] |
34 | }) | 34 | }) |
35 | 35 | ||
@@ -41,10 +41,10 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { | |||
41 | } | 41 | } |
42 | 42 | ||
43 | updateDetails () { | 43 | updateDetails () { |
44 | const displayNSFW = this.form.value['displayNSFW'] | 44 | const nsfwPolicy = this.form.value['nsfwPolicy'] |
45 | const autoPlayVideo = this.form.value['autoPlayVideo'] | 45 | const autoPlayVideo = this.form.value['autoPlayVideo'] |
46 | const details: UserUpdateMe = { | 46 | const details: UserUpdateMe = { |
47 | displayNSFW, | 47 | nsfwPolicy, |
48 | autoPlayVideo | 48 | autoPlayVideo |
49 | } | 49 | } |
50 | 50 | ||
diff --git a/client/src/app/account/account-videos/account-videos.component.html b/client/src/app/account/account-videos/account-videos.component.html index d7e2230b0..66ce3a77b 100644 --- a/client/src/app/account/account-videos/account-videos.component.html +++ b/client/src/app/account/account-videos/account-videos.component.html | |||
@@ -18,6 +18,7 @@ | |||
18 | <div class="video-info"> | 18 | <div class="video-info"> |
19 | <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> | 19 | <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> |
20 | <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> | 20 | <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> |
21 | <div class="video-info-private">{{ video.privacy.label }}</div> | ||
21 | </div> | 22 | </div> |
22 | 23 | ||
23 | <!-- Display only once --> | 24 | <!-- Display only once --> |
diff --git a/client/src/app/account/account-videos/account-videos.component.scss b/client/src/app/account/account-videos/account-videos.component.scss index 449cc6af4..f276ea389 100644 --- a/client/src/app/account/account-videos/account-videos.component.scss +++ b/client/src/app/account/account-videos/account-videos.component.scss | |||
@@ -79,8 +79,12 @@ | |||
79 | font-weight: $font-semibold; | 79 | font-weight: $font-semibold; |
80 | } | 80 | } |
81 | 81 | ||
82 | .video-info-date-views { | 82 | .video-info-date-views, .video-info-private { |
83 | font-size: 13px; | 83 | font-size: 13px; |
84 | |||
85 | &.video-info-private { | ||
86 | font-weight: $font-semibold; | ||
87 | } | ||
84 | } | 88 | } |
85 | } | 89 | } |
86 | 90 | ||