]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-user-settings/user-video-settings.component.ts
Merge branch 'feature/otp' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-user-settings / user-video-settings.component.ts
index 0cd889a8a3a27d885c6310070ec01ab2a5aadf26..af0870f127c8e7358dad6347eb7809cae49760a9 100644 (file)
@@ -3,7 +3,7 @@ import { Subject, Subscription } from 'rxjs'
 import { first } from 'rxjs/operators'
 import { Component, Input, OnDestroy, OnInit } from '@angular/core'
 import { AuthService, Notifier, ServerService, User, UserService } from '@app/core'
-import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
+import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
 import { UserUpdateMe } from '@shared/models'
 import { NSFWPolicyType } from '@shared/models/videos/nsfw-policy.type'
 
@@ -22,7 +22,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
   formValuesWatcher: Subscription
 
   constructor (
-    protected formValidatorService: FormValidatorService,
+    protected formReactiveService: FormReactiveService,
     private authService: AuthService,
     private notifier: Notifier,
     private userService: UserService,
@@ -34,7 +34,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
   ngOnInit () {
     this.buildForm({
       nsfwPolicy: null,
-      webTorrentEnabled: null,
+      p2pEnabled: null,
       autoPlayVideo: null,
       autoPlayNextVideo: null,
       videoLanguages: null
@@ -48,7 +48,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
 
           this.form.patchValue({
             nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy,
-            webTorrentEnabled: this.user.webTorrentEnabled,
+            p2pEnabled: this.user.p2pEnabled,
             autoPlayVideo: this.user.autoPlayVideo === true,
             autoPlayNextVideo: this.user.autoPlayNextVideo,
             videoLanguages: this.user.videoLanguages
@@ -65,7 +65,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
 
   updateDetails (onlyKeys?: string[]) {
     const nsfwPolicy = this.form.value['nsfwPolicy']
-    const webTorrentEnabled = this.form.value['webTorrentEnabled']
+    const p2pEnabled = this.form.value['p2pEnabled']
     const autoPlayVideo = this.form.value['autoPlayVideo']
     const autoPlayNextVideo = this.form.value['autoPlayNextVideo']
 
@@ -80,7 +80,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
 
     let details: UserUpdateMe = {
       nsfwPolicy,
-      webTorrentEnabled,
+      p2pEnabled,
       autoPlayVideo,
       autoPlayNextVideo,
       videoLanguages