aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-17 10:48:56 +0200
committerChocobozzz <me@florianbigard.com>2018-10-17 10:48:56 +0200
commitbb5d90e62f631af3c899fbe586485e64938a5927 (patch)
tree8dc28c7027a52bed76bcc7e117da290ff7a58b6b /client/src/app/+my-account
parentbcf21a376f1e26cb3e74236e4cc41909310d4c32 (diff)
parenta73115f31ae891cb47759f075b1d2cead40817a4 (diff)
downloadPeerTube-bb5d90e62f631af3c899fbe586485e64938a5927.tar.gz
PeerTube-bb5d90e62f631af3c899fbe586485e64938a5927.tar.zst
PeerTube-bb5d90e62f631af3c899fbe586485e64938a5927.zip
Merge branch 'feature/webtorrent-disabling' into develop
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html5
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts4
2 files changed, 9 insertions, 0 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 96629940f..8be8a66cc 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,6 +16,11 @@
16 </div> 16 </div>
17 17
18 <my-peertube-checkbox 18 <my-peertube-checkbox
19 inputName="webTorrentEnabled" formControlName="webTorrentEnabled"
20 i18n-labelText labelText="Use WebTorrent to exchange parts of the video with others"
21 ></my-peertube-checkbox>
22
23 <my-peertube-checkbox
19 inputName="autoPlayVideo" formControlName="autoPlayVideo" 24 inputName="autoPlayVideo" formControlName="autoPlayVideo"
20 i18n-labelText labelText="Automatically plays video" 25 i18n-labelText labelText="Automatically plays video"
21 ></my-peertube-checkbox> 26 ></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 7089b2057..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,12 +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 webTorrentEnabled: null,
32 autoPlayVideo: null 33 autoPlayVideo: null
33 }) 34 })
34 35
35 this.userInformationLoaded.subscribe(() => { 36 this.userInformationLoaded.subscribe(() => {
36 this.form.patchValue({ 37 this.form.patchValue({
37 nsfwPolicy: this.user.nsfwPolicy, 38 nsfwPolicy: this.user.nsfwPolicy,
39 webTorrentEnabled: this.user.webTorrentEnabled,
38 autoPlayVideo: this.user.autoPlayVideo === true 40 autoPlayVideo: this.user.autoPlayVideo === true
39 }) 41 })
40 }) 42 })
@@ -42,9 +44,11 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI
42 44
43 updateDetails () { 45 updateDetails () {
44 const nsfwPolicy = this.form.value['nsfwPolicy'] 46 const nsfwPolicy = this.form.value['nsfwPolicy']
47 const webTorrentEnabled = this.form.value['webTorrentEnabled']
45 const autoPlayVideo = this.form.value['autoPlayVideo'] 48 const autoPlayVideo = this.form.value['autoPlayVideo']
46 const details: UserUpdateMe = { 49 const details: UserUpdateMe = {
47 nsfwPolicy, 50 nsfwPolicy,
51 webTorrentEnabled,
48 autoPlayVideo 52 autoPlayVideo
49 } 53 }
50 54