Merge pull request #982 from mempool/simon/core-contributors
Adding Core Contributors on the About page
This commit is contained in:
commit
e28f5cc403
@ -159,20 +159,32 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="contributors">
|
<ng-container *ngIf="allContributors$ | async as contributors else loadingSponsors">
|
||||||
<h3 i18n="about.contributors">Project Contributors</h3>
|
<div class="contributors">
|
||||||
<div class="wrapper">
|
<h3 i18n="about.contributors">Project Contributors</h3>
|
||||||
<ng-container *ngIf="contributors$ | async as contributors; else loadingSponsors">
|
<div class="wrapper">
|
||||||
<ng-template ngFor let-contributor [ngForOf]="contributors">
|
<ng-template ngFor let-contributor [ngForOf]="contributors.regular">
|
||||||
<a [href]="'https://github.com/' + contributor.name" target="_blank" [title]="contributor.name">
|
<a [href]="'https://github.com/' + contributor.name" target="_blank" [title]="contributor.name">
|
||||||
<img class="image" [src]="'/api/v1/contributors/images/' + contributor.id" />
|
<img class="image" [src]="'/api/v1/contributors/images/' + contributor.id" />
|
||||||
<span>{{ contributor.name }}</span>
|
<span>{{ contributor.name }}</span>
|
||||||
</a>
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="maintainers" *ngIf="contributors.core.length">
|
||||||
|
<h3 i18n="about.core_contributors">Core Contributors</h3>
|
||||||
|
<div class="wrapper">
|
||||||
|
<ng-template ngFor let-contributor [ngForOf]="contributors.core">
|
||||||
|
<a [href]="'https://github.com/' + contributor.name" target="_blank" [title]="contributor.name">
|
||||||
|
<img class="image" [src]="'/api/v1/contributors/images/' + contributor.id" />
|
||||||
|
<span>{{ contributor.name }}</span>
|
||||||
|
</a>
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<div class="maintainers">
|
<div class="maintainers">
|
||||||
<h3 i18n="about.maintainers">Project Maintainers</h3>
|
<h3 i18n="about.maintainers">Project Maintainers</h3>
|
||||||
|
@ -6,6 +6,7 @@ import { Observable } from 'rxjs';
|
|||||||
import { ApiService } from 'src/app/services/api.service';
|
import { ApiService } from 'src/app/services/api.service';
|
||||||
import { IBackendInfo } from 'src/app/interfaces/websocket.interface';
|
import { IBackendInfo } from 'src/app/interfaces/websocket.interface';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about',
|
selector: 'app-about',
|
||||||
@ -16,7 +17,7 @@ import { Router } from '@angular/router';
|
|||||||
export class AboutComponent implements OnInit {
|
export class AboutComponent implements OnInit {
|
||||||
backendInfo$: Observable<IBackendInfo>;
|
backendInfo$: Observable<IBackendInfo>;
|
||||||
sponsors$: Observable<any>;
|
sponsors$: Observable<any>;
|
||||||
contributors$: Observable<any>;
|
allContributors$: Observable<any>;
|
||||||
frontendGitCommitHash = this.stateService.env.GIT_COMMIT_HASH;
|
frontendGitCommitHash = this.stateService.env.GIT_COMMIT_HASH;
|
||||||
packetJsonVersion = this.stateService.env.PACKAGE_JSON_VERSION;
|
packetJsonVersion = this.stateService.env.PACKAGE_JSON_VERSION;
|
||||||
officialMempoolSpace = this.stateService.env.OFFICIAL_MEMPOOL_SPACE;
|
officialMempoolSpace = this.stateService.env.OFFICIAL_MEMPOOL_SPACE;
|
||||||
@ -37,7 +38,14 @@ export class AboutComponent implements OnInit {
|
|||||||
this.websocketService.want(['blocks']);
|
this.websocketService.want(['blocks']);
|
||||||
|
|
||||||
this.sponsors$ = this.apiService.getDonation$();
|
this.sponsors$ = this.apiService.getDonation$();
|
||||||
this.contributors$ = this.apiService.getContributor$();
|
this.allContributors$ = this.apiService.getContributor$().pipe(
|
||||||
|
map((contributors) => {
|
||||||
|
return {
|
||||||
|
regular: contributors.filter((user) => !user.core_constributor),
|
||||||
|
core: contributors.filter((user) => user.core_constributor),
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sponsor() {
|
sponsor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user