Display all Project Contributors on About page using GitHub API (#382)
This commit is contained in:
parent
d5cc558670
commit
e32066affd
@ -281,19 +281,43 @@
|
|||||||
<div class="row row-cols-2" dir="ltr">
|
<div class="row row-cols-2" dir="ltr">
|
||||||
<div class="col col-md-2 offset-md-4">
|
<div class="col col-md-2 offset-md-4">
|
||||||
<a href="https://twitter.com/softsimon_">
|
<a href="https://twitter.com/softsimon_">
|
||||||
<div class="profile_photo mx-auto" style="background-image: url(/resources/profile/softsimon.jpg)"></div>
|
<div class="profile_photo d-inline-block" title="softsimon">
|
||||||
@softsimon_
|
<img class="profile_img" src="resources/profile/softsimon.jpg" />
|
||||||
|
softsimon
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-md-2">
|
<div class="col col-md-2">
|
||||||
<a href="https://twitter.com/wiz">
|
<a href="https://twitter.com/wiz">
|
||||||
<div class="profile_photo mx-auto" style="background-image: url(/resources/profile/wiz.png)"></div>
|
<div class="profile_photo d-inline-block" title="wiz">
|
||||||
@wiz
|
<img class="profile_img" src="resources/profile/wiz.png" />
|
||||||
|
wiz
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h3 i18n="about.contributors">Project Contributors</h3>
|
||||||
|
|
||||||
|
<div *ngIf="contributors === null">
|
||||||
|
<br>
|
||||||
|
<div class="spinner-border text-light"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ng-template ngFor let-contributor [ngForOf]="contributors">
|
||||||
|
<a [href]="'https://github.com/' + contributor.name" target="_blank">
|
||||||
|
<div class="profile_photo d-inline-block" [title]="contributor.name">
|
||||||
|
<img class="profile_img" [src]="'/api/v1/contributors/images/' + contributor.id" />
|
||||||
|
{{ contributor.name }}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
@ -19,9 +19,11 @@ export class AboutComponent implements OnInit, OnDestroy {
|
|||||||
paymentForm: FormGroup;
|
paymentForm: FormGroup;
|
||||||
donationStatus = 1;
|
donationStatus = 1;
|
||||||
sponsors$: Observable<any>;
|
sponsors$: Observable<any>;
|
||||||
|
contributors$: Observable<any>;
|
||||||
donationObj: any;
|
donationObj: any;
|
||||||
sponsorsEnabled = this.stateService.env.OFFICIAL_MEMPOOL_SPACE;
|
sponsorsEnabled = this.stateService.env.OFFICIAL_MEMPOOL_SPACE;
|
||||||
sponsors = null;
|
sponsors = null;
|
||||||
|
contributors = null;
|
||||||
requestSubscription: Subscription | undefined;
|
requestSubscription: Subscription | undefined;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -51,6 +53,11 @@ export class AboutComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe((sponsors) => {
|
.subscribe((sponsors) => {
|
||||||
this.sponsors = sponsors;
|
this.sponsors = sponsors;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.apiService.getContributor$()
|
||||||
|
.subscribe((contributors) => {
|
||||||
|
this.contributors = contributors;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -77,6 +77,10 @@ export class ApiService {
|
|||||||
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations');
|
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getContributor$(): Observable<any[]> {
|
||||||
|
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/contributors');
|
||||||
|
}
|
||||||
|
|
||||||
checkDonation$(orderId: string): Observable<any[]> {
|
checkDonation$(orderId: string): Observable<any[]> {
|
||||||
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations/check?order_id=' + orderId);
|
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations/check?order_id=' + orderId);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,12 @@
|
|||||||
location /api/v1/donations/images {
|
location /api/v1/donations/images {
|
||||||
proxy_pass https://mempool.space;
|
proxy_pass https://mempool.space;
|
||||||
}
|
}
|
||||||
|
location /api/v1/contributors {
|
||||||
|
proxy_pass https://mempool.space;
|
||||||
|
}
|
||||||
|
location /api/v1/contributors/images {
|
||||||
|
proxy_pass https://mempool.space;
|
||||||
|
}
|
||||||
location /api/v1/ws {
|
location /api/v1/ws {
|
||||||
proxy_pass http://127.0.0.1:8999/;
|
proxy_pass http://127.0.0.1:8999/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user