aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-video-settings
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-video-settings')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html17
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts8
2 files changed, 15 insertions, 10 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html
index 0e8598e9e..98587eb18 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html
+++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html
@@ -1,13 +1,16 @@
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 <label for="nsfwPolicy">Default policy on videos containing sensitive content</label> 3 <label i18n for="nsfwPolicy">Default policy on videos containing sensitive content</label>
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> 4 <my-help
5 helpType="custom" i18n-customHtml
6 customHtml="With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video."
7 ></my-help>
5 8
6 <div class="peertube-select-container"> 9 <div class="peertube-select-container">
7 <select id="nsfwPolicy" formControlName="nsfwPolicy"> 10 <select id="nsfwPolicy" formControlName="nsfwPolicy">
8 <option value="do_not_list">Do not list</option> 11 <option i18n value="do_not_list">Do not list</option>
9 <option value="blur">Blur thumbnails</option> 12 <option i18n value="blur">Blur thumbnails</option>
10 <option value="display">Display</option> 13 <option i18n value="display">Display</option>
11 </select> 14 </select>
12 </div> 15 </div>
13 </div> 16 </div>
@@ -18,8 +21,8 @@
18 formControlName="autoPlayVideo" 21 formControlName="autoPlayVideo"
19 > 22 >
20 <label for="autoPlayVideo"></label> 23 <label for="autoPlayVideo"></label>
21 <label for="autoPlayVideo">Automatically plays video</label> 24 <label i18n for="autoPlayVideo">Automatically plays video</label>
22 </div> 25 </div>
23 26
24 <input type="submit" value="Save" [disabled]="!form.valid"> 27 <input type="submit" i18n-value value="Save" [disabled]="!form.valid">
25</form> 28</form>
diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts
index acc70c14d..4588f73db 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts
@@ -4,6 +4,7 @@ import { NotificationsService } from 'angular2-notifications'
4import { UserUpdateMe } from '../../../../../../shared' 4import { UserUpdateMe } from '../../../../../../shared'
5import { AuthService } from '../../../core' 5import { AuthService } from '../../../core'
6import { FormReactive, User, UserService } from '../../../shared' 6import { FormReactive, User, UserService } from '../../../shared'
7import { I18n } from '@ngx-translate/i18n-polyfill'
7 8
8@Component({ 9@Component({
9 selector: 'my-account-video-settings', 10 selector: 'my-account-video-settings',
@@ -21,7 +22,8 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI
21 private authService: AuthService, 22 private authService: AuthService,
22 private formBuilder: FormBuilder, 23 private formBuilder: FormBuilder,
23 private notificationsService: NotificationsService, 24 private notificationsService: NotificationsService,
24 private userService: UserService 25 private userService: UserService,
26 private i18n: I18n
25 ) { 27 ) {
26 super() 28 super()
27 } 29 }
@@ -49,12 +51,12 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI
49 51
50 this.userService.updateMyProfile(details).subscribe( 52 this.userService.updateMyProfile(details).subscribe(
51 () => { 53 () => {
52 this.notificationsService.success('Success', 'Information updated.') 54 this.notificationsService.success(this.i18n('Success'), this.i18n('Information updated.'))
53 55
54 this.authService.refreshUserInformation() 56 this.authService.refreshUserInformation()
55 }, 57 },
56 58
57 err => this.notificationsService.error('Error', err.message) 59 err => this.notificationsService.error(this.i18n('Error'), err.message)
58 ) 60 )
59 } 61 }
60} 62}