aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu
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/menu
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/menu')
-rw-r--r--client/src/app/menu/menu.component.html2
-rw-r--r--client/src/app/menu/menu.component.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html
index 9ea991042..48b3fdc85 100644
--- a/client/src/app/menu/menu.component.html
+++ b/client/src/app/menu/menu.component.html
@@ -60,7 +60,7 @@
60 <my-global-icon iconName="p2p" aria-hidden="true"></my-global-icon> 60 <my-global-icon iconName="p2p" aria-hidden="true"></my-global-icon>
61 <ng-container i18n>Help share videos</ng-container> 61 <ng-container i18n>Help share videos</ng-container>
62 62
63 <my-input-switch class="ml-auto" [checked]="user.webTorrentEnabled"></my-input-switch> 63 <my-input-switch class="ml-auto" [checked]="user.p2pEnabled"></my-input-switch>
64 </a> 64 </a>
65 65
66 <div class="dropdown-divider"></div> 66 <div class="dropdown-divider"></div>
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index d5ddc29cb..983f0a938 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -196,9 +196,9 @@ export class MenuComponent implements OnInit {
196 196
197 toggleUseP2P () { 197 toggleUseP2P () {
198 if (!this.user) return 198 if (!this.user) return
199 this.user.webTorrentEnabled = !this.user.webTorrentEnabled 199 this.user.p2pEnabled = !this.user.p2pEnabled
200 200
201 this.userService.updateMyProfile({ webTorrentEnabled: this.user.webTorrentEnabled }) 201 this.userService.updateMyProfile({ p2pEnabled: this.user.p2pEnabled })
202 .subscribe(() => this.authService.refreshUserInformation()) 202 .subscribe(() => this.authService.refreshUserInformation())
203 } 203 }
204 204