diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-video-settings')
2 files changed, 12 insertions, 8 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 adbb97f00..50f798c79 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 | |||
@@ -16,18 +16,22 @@ | |||
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | <div class="form-group"> | 18 | <div class="form-group"> |
19 | <label i18n for="webTorrentPolicy">Policy regarding P2P technologies</label> | 19 | <label i18n for="webTorrentEnabled">Policy regarding P2P technologies</label> |
20 | 20 | ||
21 | <div class="peertube-select-container"> | 21 | <div class="peertube-select-container"> |
22 | <select id="webTorrentPolicy" formControlName="webTorrentPolicy"> | 22 | <select id="webTorrentEnabled" formControlName="webTorrentEnabled"> |
23 | <option i18n value="enable">Enable WebTorrent</option> | 23 | <option i18n value="enable">Enable WebTorrent</option> |
24 | <option i18n value="disable">Disable WebTorrent globally</option> | 24 | <option i18n value="disable">Disable WebTorrent</option> |
25 | <option i18n value="disable_on_mobile" disabled>Disable WebTorrent on mobile devices (not yet available)</option> | ||
26 | </select> | 25 | </select> |
27 | </div> | 26 | </div> |
28 | </div> | 27 | </div> |
29 | 28 | ||
30 | <my-peertube-checkbox | 29 | <my-peertube-checkbox |
30 | inputName="webTorrentEnabled" formControlName="webTorrentEnabled" | ||
31 | i18n-labelText labelText="Use WebTorrent to exchange parts of the video with others" | ||
32 | ></my-peertube-checkbox> | ||
33 | |||
34 | <my-peertube-checkbox | ||
31 | inputName="autoPlayVideo" formControlName="autoPlayVideo" | 35 | inputName="autoPlayVideo" formControlName="autoPlayVideo" |
32 | i18n-labelText labelText="Automatically plays video" | 36 | i18n-labelText labelText="Automatically plays video" |
33 | ></my-peertube-checkbox> | 37 | ></my-peertube-checkbox> |
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 9e711a227..6c9a7ce75 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 | |||
@@ -29,14 +29,14 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI | |||
29 | ngOnInit () { | 29 | ngOnInit () { |
30 | this.buildForm({ | 30 | this.buildForm({ |
31 | nsfwPolicy: null, | 31 | nsfwPolicy: null, |
32 | webTorrentPolicy: null, | 32 | webTorrentEnabled: null, |
33 | autoPlayVideo: null | 33 | autoPlayVideo: null |
34 | }) | 34 | }) |
35 | 35 | ||
36 | this.userInformationLoaded.subscribe(() => { | 36 | this.userInformationLoaded.subscribe(() => { |
37 | this.form.patchValue({ | 37 | this.form.patchValue({ |
38 | nsfwPolicy: this.user.nsfwPolicy, | 38 | nsfwPolicy: this.user.nsfwPolicy, |
39 | webTorrentPolicy: this.user.webTorrentPolicy, | 39 | webTorrentEnabled: this.user.webTorrentEnabled, |
40 | autoPlayVideo: this.user.autoPlayVideo === true | 40 | autoPlayVideo: this.user.autoPlayVideo === true |
41 | }) | 41 | }) |
42 | }) | 42 | }) |
@@ -44,11 +44,11 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI | |||
44 | 44 | ||
45 | updateDetails () { | 45 | updateDetails () { |
46 | const nsfwPolicy = this.form.value['nsfwPolicy'] | 46 | const nsfwPolicy = this.form.value['nsfwPolicy'] |
47 | const webTorrentPolicy = this.form.value['webTorrentPolicy'] | 47 | const webTorrentEnabled = this.form.value['webTorrentEnabled'] |
48 | const autoPlayVideo = this.form.value['autoPlayVideo'] | 48 | const autoPlayVideo = this.form.value['autoPlayVideo'] |
49 | const details: UserUpdateMe = { | 49 | const details: UserUpdateMe = { |
50 | nsfwPolicy, | 50 | nsfwPolicy, |
51 | webTorrentPolicy, | 51 | webTorrentEnabled, |
52 | autoPlayVideo | 52 | autoPlayVideo |
53 | } | 53 | } |
54 | 54 | ||