Enhancements to the sponsorship GUI

fixes  #128
This commit is contained in:
softsimon
2020-10-08 17:51:10 +07:00
parent ad144a34ac
commit 784f00b725
9 changed files with 122 additions and 75 deletions

View File

@@ -19,6 +19,7 @@ export class AboutComponent implements OnInit {
sponsors$: Observable<any>;
donationObj: any;
sponsorsEnabled = env.SPONSORS_ENABLED;
sponsors = null;
constructor(
private websocketService: WebsocketService,
@@ -38,7 +39,12 @@ export class AboutComponent implements OnInit {
handle: [''],
});
this.sponsors$ = this.apiService.getDonation$();
(this.sponsorsEnabled ? this.apiService.getDonation$() : this.apiService.getDonationRemote$())
.subscribe((sponsors) => {
this.sponsors = sponsors;
});
this.apiService.getDonation$()
this.stateService.donationConfirmed$.subscribe(() => this.donationStatus = 4);
}