aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorFlorian CUNY <poslovitch@bentobox.world>2020-12-01 15:04:29 +0100
committerGitHub <noreply@github.com>2020-12-01 15:04:29 +0100
commita3f1595f791e3084398f983847c4bac43498a541 (patch)
tree0feb060316e701f69a4fbf5d09b1eb96f32d7650 /client/src/app
parent117c643e45364340b9eaa0783ee2d23abc0324df (diff)
downloadPeerTube-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')
-rw-r--r--client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.html1
-rw-r--r--client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts5
2 files changed, 5 insertions, 1 deletions
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 @@
28 28
29 <input 29 <input
30 type="submit" i18n-value value="Accept" class="action-button-submit" 30 type="submit" i18n-value value="Accept" class="action-button-submit"
31 [disabled]="!form.valid"
32 (click)="close()" 31 (click)="close()"
33 > 32 >
34 </div> 33 </div>
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 })