diff options
author | Florian CUNY <poslovitch@bentobox.world> | 2020-12-01 15:04:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 15:04:29 +0100 |
commit | a3f1595f791e3084398f983847c4bac43498a541 (patch) | |
tree | 0feb060316e701f69a4fbf5d09b1eb96f32d7650 /client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts | |
parent | 117c643e45364340b9eaa0783ee2d23abc0324df (diff) | |
download | PeerTube-a3f1595f791e3084398f983847c4bac43498a541.tar.gz PeerTube-a3f1595f791e3084398f983847c4bac43498a541.tar.zst PeerTube-a3f1595f791e3084398f983847c4bac43498a541.zip |
Select first available channel when accepting ownership change (#3382)
* Select first available channel when accepting ownership change
Implements https://github.com/Chocobozzz/PeerTube/issues/2240
* Made use of #patchValue() to set the default selected value
And removed the disabled state for the Accept button
Diffstat (limited to 'client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts')
-rw-r--r-- | client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts index 51e9b2a6d..0e2395754 100644 --- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts +++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts | |||
@@ -47,6 +47,11 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit { | |||
47 | } | 47 | } |
48 | 48 | ||
49 | show (videoChangeOwnership: VideoChangeOwnership) { | 49 | show (videoChangeOwnership: VideoChangeOwnership) { |
50 | // Select the first available channel by default | ||
51 | this.form.patchValue({ | ||
52 | channel: this.videoChannels[0].id | ||
53 | }) | ||
54 | |||
50 | this.videoChangeOwnership = videoChangeOwnership | 55 | this.videoChangeOwnership = videoChangeOwnership |
51 | this.modalService | 56 | this.modalService |
52 | .open(this.modal, { centered: true }) | 57 | .open(this.modal, { centered: true }) |