aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-21 11:07:49 +0200
committerChocobozzz <me@florianbigard.com>2023-07-21 11:07:49 +0200
commitb63c607b92fd3ec62e370b73e398062bcf317738 (patch)
tree408324fc028b29a68e82653ebe3a96c54948d23b /client/src/app/shared/shared-forms
parent305facdfab1d5029366d2262ac390b9c71752e4b (diff)
downloadPeerTube-b63c607b92fd3ec62e370b73e398062bcf317738.tar.gz
PeerTube-b63c607b92fd3ec62e370b73e398062bcf317738.tar.zst
PeerTube-b63c607b92fd3ec62e370b73e398062bcf317738.zip
Fix updating P2P setting
Diffstat (limited to 'client/src/app/shared/shared-forms')
-rw-r--r--client/src/app/shared/shared-forms/input-switch.component.html2
-rw-r--r--client/src/app/shared/shared-forms/input-switch.component.ts1
2 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-forms/input-switch.component.html b/client/src/app/shared/shared-forms/input-switch.component.html
index 4017d4aa5..2def02a05 100644
--- a/client/src/app/shared/shared-forms/input-switch.component.html
+++ b/client/src/app/shared/shared-forms/input-switch.component.html
@@ -1,2 +1,2 @@
1<input type="checkbox" [checked]="checked" [name]="inputName" [id]="inputName" (change)="update()" /> 1<input type="checkbox" [checked]="checked" [name]="inputName" [id]="inputName" (change)="update()" [disabled]="preventUpdate" />
2<label [for]="inputName" class="ms-auto">Toggle</label> 2<label [for]="inputName" class="ms-auto">Toggle</label>
diff --git a/client/src/app/shared/shared-forms/input-switch.component.ts b/client/src/app/shared/shared-forms/input-switch.component.ts
index abb96de62..e019029c5 100644
--- a/client/src/app/shared/shared-forms/input-switch.component.ts
+++ b/client/src/app/shared/shared-forms/input-switch.component.ts
@@ -16,6 +16,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
16export class InputSwitchComponent implements ControlValueAccessor { 16export class InputSwitchComponent implements ControlValueAccessor {
17 @Input() checked = false 17 @Input() checked = false
18 @Input() inputName: string 18 @Input() inputName: string
19 @Input() preventUpdate = false
19 20
20 propagateChange = (_: any) => { /* empty */ } 21 propagateChange = (_: any) => { /* empty */ }
21 22