From: Florian CUNY Date: Tue, 1 Dec 2020 14:04:29 +0000 (+0100) Subject: Select first available channel when accepting ownership change (#3382) X-Git-Tag: v3.0.0-rc.1~185 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=a3f1595f791e3084398f983847c4bac43498a541;p=github%2FChocobozzz%2FPeerTube.git 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 --- diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.html b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.html index def1cbab6..27aab13b6 100644 --- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.html +++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.html @@ -28,7 +28,6 @@ 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 { } show (videoChangeOwnership: VideoChangeOwnership) { + // Select the first available channel by default + this.form.patchValue({ + channel: this.videoChannels[0].id + }) + this.videoChangeOwnership = videoChangeOwnership this.modalService .open(this.modal, { centered: true })