diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-21 11:07:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-21 11:07:49 +0200 |
commit | b63c607b92fd3ec62e370b73e398062bcf317738 (patch) | |
tree | 408324fc028b29a68e82653ebe3a96c54948d23b /client/src/app/shared/shared-forms | |
parent | 305facdfab1d5029366d2262ac390b9c71752e4b (diff) | |
download | PeerTube-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.html | 2 | ||||
-rw-r--r-- | client/src/app/shared/shared-forms/input-switch.component.ts | 1 |
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' | |||
16 | export class InputSwitchComponent implements ControlValueAccessor { | 16 | export 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 | ||