aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-settings
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-15 15:58:10 +0100
committerChocobozzz <me@florianbigard.com>2021-12-16 10:08:55 +0100
commita9bfa85d2cdf13670aaced740da5b493fbeddfce (patch)
tree3781c9218d4cc7786b6589365c0efbed2151703d /client/src/app/shared/shared-user-settings
parentc77fdc605b3ccc1ab6890f889d8200fbe9372949 (diff)
downloadPeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.tar.gz
PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.tar.zst
PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.zip
Add ability for admins to set default p2p policy
Diffstat (limited to 'client/src/app/shared/shared-user-settings')
-rw-r--r--client/src/app/shared/shared-user-settings/user-video-settings.component.html2
-rw-r--r--client/src/app/shared/shared-user-settings/user-video-settings.component.ts8
2 files changed, 5 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.html b/client/src/app/shared/shared-user-settings/user-video-settings.component.html
index bc9dd0f7f..4843f65b9 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.html
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.html
@@ -38,7 +38,7 @@
38 38
39 <div class="form-group"> 39 <div class="form-group">
40 <my-peertube-checkbox 40 <my-peertube-checkbox
41 inputName="webTorrentEnabled" formControlName="webTorrentEnabled" [recommended]="true" 41 inputName="p2pEnabled" formControlName="p2pEnabled" [recommended]="true"
42 i18n-labelText labelText="Help share videos being played" 42 i18n-labelText labelText="Help share videos being played"
43 > 43 >
44 <ng-container ngProjectAs="description"> 44 <ng-container ngProjectAs="description">
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
index 0cd889a8a..7d6b69469 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
@@ -34,7 +34,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
34 ngOnInit () { 34 ngOnInit () {
35 this.buildForm({ 35 this.buildForm({
36 nsfwPolicy: null, 36 nsfwPolicy: null,
37 webTorrentEnabled: null, 37 p2pEnabled: null,
38 autoPlayVideo: null, 38 autoPlayVideo: null,
39 autoPlayNextVideo: null, 39 autoPlayNextVideo: null,
40 videoLanguages: null 40 videoLanguages: null
@@ -48,7 +48,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
48 48
49 this.form.patchValue({ 49 this.form.patchValue({
50 nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy, 50 nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy,
51 webTorrentEnabled: this.user.webTorrentEnabled, 51 p2pEnabled: this.user.p2pEnabled,
52 autoPlayVideo: this.user.autoPlayVideo === true, 52 autoPlayVideo: this.user.autoPlayVideo === true,
53 autoPlayNextVideo: this.user.autoPlayNextVideo, 53 autoPlayNextVideo: this.user.autoPlayNextVideo,
54 videoLanguages: this.user.videoLanguages 54 videoLanguages: this.user.videoLanguages
@@ -65,7 +65,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
65 65
66 updateDetails (onlyKeys?: string[]) { 66 updateDetails (onlyKeys?: string[]) {
67 const nsfwPolicy = this.form.value['nsfwPolicy'] 67 const nsfwPolicy = this.form.value['nsfwPolicy']
68 const webTorrentEnabled = this.form.value['webTorrentEnabled'] 68 const p2pEnabled = this.form.value['p2pEnabled']
69 const autoPlayVideo = this.form.value['autoPlayVideo'] 69 const autoPlayVideo = this.form.value['autoPlayVideo']
70 const autoPlayNextVideo = this.form.value['autoPlayNextVideo'] 70 const autoPlayNextVideo = this.form.value['autoPlayNextVideo']
71 71
@@ -80,7 +80,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
80 80
81 let details: UserUpdateMe = { 81 let details: UserUpdateMe = {
82 nsfwPolicy, 82 nsfwPolicy,
83 webTorrentEnabled, 83 p2pEnabled,
84 autoPlayVideo, 84 autoPlayVideo,
85 autoPlayNextVideo, 85 autoPlayNextVideo,
86 videoLanguages 86 videoLanguages