[sponsors] show profile by tiers on about page
This commit is contained in:
		
							parent
							
								
									d236d89717
								
							
						
					
					
						commit
						f2ae858097
					
				@ -31,6 +31,12 @@
 | 
				
			|||||||
    <track label="Português" kind="captions" srclang="pt" src="/resources/promo-video/pt.vtt" [attr.default]="showSubtitles('pt') ? '' : null">
 | 
					    <track label="Português" kind="captions" srclang="pt" src="/resources/promo-video/pt.vtt" [attr.default]="showSubtitles('pt') ? '' : null">
 | 
				
			||||||
  </video>
 | 
					  </video>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <h3 i18n="about.sponsors.enterprise.withRocket" class="mt-5">Support the Project</h3>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <div class="d-flex justify-content-center" style="max-width: 90%; margin: 35px auto 75px auto; column-gap: 15px">
 | 
				
			||||||
 | 
					    <a href="/sponsor" class="btn" style="background-color: rgba(152, 88, 255, 0.75); box-shadow: 0px 0px 50px 5px rgba(152, 88, 255, 0.75)">Become a Sponsor!</a>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <div class="enterprise-sponsor" id="enterprise-sponsors">
 | 
					  <div class="enterprise-sponsor" id="enterprise-sponsors">
 | 
				
			||||||
    <h3 i18n="about.sponsors.enterprise.withRocket">Enterprise Sponsors 🚀</h3>
 | 
					    <h3 i18n="about.sponsors.enterprise.withRocket">Enterprise Sponsors 🚀</h3>
 | 
				
			||||||
    <div class="wrapper">
 | 
					    <div class="wrapper">
 | 
				
			||||||
@ -191,20 +197,43 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <div class="community-sponsor" id="community-sponsors">
 | 
					  <div *ngIf="profiles$ | async as profiles" id="community-sponsors">
 | 
				
			||||||
    <h3 i18n="about.sponsors.withHeart">Community Sponsors ❤️</h3>
 | 
					    <div class="community-sponsor" style="margin-bottom: 68px" *ngIf="profiles.whales.length > 0">
 | 
				
			||||||
 | 
					      <h3 i18n="about.sponsors.withHeart">Whale Sponsors</h3>
 | 
				
			||||||
      <div class="wrapper">
 | 
					      <div class="wrapper">
 | 
				
			||||||
      <ng-container *ngIf="sponsors$ | async as sponsors; else loadingSponsors">
 | 
					        <ng-container>
 | 
				
			||||||
        <ng-template ngFor let-sponsor [ngForOf]="sponsors">
 | 
					          <ng-template ngFor let-sponsor [ngForOf]="profiles.whales">
 | 
				
			||||||
          <a [href]="'https://twitter.com/' + sponsor.handle" target="_blank" rel="sponsored" [title]="sponsor.handle">
 | 
					            <a [href]="'https://twitter.com/' + sponsor.username" target="_blank" rel="sponsored" [title]="sponsor.username">
 | 
				
			||||||
            <img class="image" [src]="'/api/v1/donations/images/' + sponsor.handle" />
 | 
					              <img class="image" [src]="'data:' + sponsor.image_mime + ';base64,' + sponsor.image" onError="this.src = '/resources/profile/unknown.svg'; this.className = 'image unknown'"/>
 | 
				
			||||||
            </a>
 | 
					            </a>
 | 
				
			||||||
          </ng-template>
 | 
					          </ng-template>
 | 
				
			||||||
        </ng-container>
 | 
					        </ng-container>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="community-sponsor" style="margin-bottom: 68px" *ngIf="profiles.chads.length > 0">
 | 
				
			||||||
 | 
					      <h3 i18n="about.sponsors.withHeart">Chad Sponsors</h3>
 | 
				
			||||||
 | 
					      <div class="wrapper">
 | 
				
			||||||
 | 
					        <ng-template ngFor let-sponsor [ngForOf]="profiles.chads">
 | 
				
			||||||
 | 
					          <a [href]="'https://twitter.com/' + sponsor.username" target="_blank" rel="sponsored" [title]="sponsor.username">
 | 
				
			||||||
 | 
					            <img class="image" [src]="'data:' + sponsor.image_mime + ';base64,' + sponsor.image" onError="this.src = '/resources/profile/unknown.svg'; this.className = 'image unknown'"/>
 | 
				
			||||||
 | 
					          </a>
 | 
				
			||||||
 | 
					        </ng-template>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <div class="community-sponsor" style="margin-bottom: 68px">
 | 
				
			||||||
 | 
					    <h3 i18n="about.sponsors.withHeart">OG Sponsors ❤️</h3>
 | 
				
			||||||
 | 
					    <div class="wrapper">
 | 
				
			||||||
 | 
					      <ng-container *ngIf="ogs$ | async as ogs; else loadingSponsors">
 | 
				
			||||||
 | 
					        <a *ngFor="let ogSponsor of ogs" [href]="'https://twitter.com/' + ogSponsor.handle" target="_blank" rel="sponsored" [title]="ogSponsor.handle">
 | 
				
			||||||
 | 
					          <img class="image" [src]="'/api/v1/donations/images/' + ogSponsor.handle" onError="this.src = '/resources/profile/unknown.svg'; this.className = 'image unknown'"/>
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					      </ng-container>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <div class="community-integrations-sponsor" id="community-integrations">
 | 
					  <div class="community-integrations-sponsor" id="community-integrations">
 | 
				
			||||||
    <h3 i18n="about.community-integrations">Community Integrations</h3>
 | 
					    <h3 i18n="about.community-integrations">Community Integrations</h3>
 | 
				
			||||||
    <div class="wrapper">
 | 
					    <div class="wrapper">
 | 
				
			||||||
@ -340,7 +369,7 @@
 | 
				
			|||||||
      <div class="wrapper">
 | 
					      <div class="wrapper">
 | 
				
			||||||
        <ng-template ngFor let-translator [ngForOf]="translators">
 | 
					        <ng-template ngFor let-translator [ngForOf]="translators">
 | 
				
			||||||
          <a [href]="'https://twitter.com/' + translator.value" target="_blank" [title]="translator.key">
 | 
					          <a [href]="'https://twitter.com/' + translator.value" target="_blank" [title]="translator.key">
 | 
				
			||||||
            <img class="image" [src]="'/api/v1/translators/images/' + translator.value" />
 | 
					            <img class="image" [src]="'/api/v1/translators/images/' + translator.value" onError="this.src = '/resources/profile/unknown.svg'; this.className = 'image unknown'"/>
 | 
				
			||||||
          </a>
 | 
					          </a>
 | 
				
			||||||
        </ng-template>
 | 
					        </ng-template>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -354,7 +383,7 @@
 | 
				
			|||||||
      <div class="wrapper">
 | 
					      <div class="wrapper">
 | 
				
			||||||
        <ng-template ngFor let-contributor [ngForOf]="contributors.regular">
 | 
					        <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" onError="this.src = '/resources/profile/unknown.svg'; this.className = 'image unknown'"/>
 | 
				
			||||||
            <span>{{ contributor.name }}</span>
 | 
					            <span>{{ contributor.name }}</span>
 | 
				
			||||||
          </a>
 | 
					          </a>
 | 
				
			||||||
        </ng-template>
 | 
					        </ng-template>
 | 
				
			||||||
@ -366,7 +395,7 @@
 | 
				
			|||||||
      <div class="wrapper">
 | 
					      <div class="wrapper">
 | 
				
			||||||
        <ng-template ngFor let-contributor [ngForOf]="contributors.core">
 | 
					        <ng-template ngFor let-contributor [ngForOf]="contributors.core">
 | 
				
			||||||
          <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" onError="this.src = '/resources/profile/unknown.svg'; this.className = 'image unknown'"/>
 | 
				
			||||||
            <span>{{ contributor.name }}</span>
 | 
					            <span>{{ contributor.name }}</span>
 | 
				
			||||||
          </a>
 | 
					          </a>
 | 
				
			||||||
        </ng-template>
 | 
					        </ng-template>
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,9 @@
 | 
				
			|||||||
    margin: 25px;
 | 
					    margin: 25px;
 | 
				
			||||||
    line-height: 32px;
 | 
					    line-height: 32px;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .unknown {
 | 
				
			||||||
 | 
					    border: 1px solid #b4b4b4;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .image.not-rounded {
 | 
					  .image.not-rounded {
 | 
				
			||||||
    border-radius: 0;
 | 
					    border-radius: 0;
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@ import { Observable } from 'rxjs';
 | 
				
			|||||||
import { ApiService } from '../../services/api.service';
 | 
					import { ApiService } from '../../services/api.service';
 | 
				
			||||||
import { IBackendInfo } from '../../interfaces/websocket.interface';
 | 
					import { IBackendInfo } from '../../interfaces/websocket.interface';
 | 
				
			||||||
import { Router, ActivatedRoute } from '@angular/router';
 | 
					import { Router, ActivatedRoute } from '@angular/router';
 | 
				
			||||||
import { map, tap } from 'rxjs/operators';
 | 
					import { map, share, tap } from 'rxjs/operators';
 | 
				
			||||||
import { ITranslators } from '../../interfaces/node-api.interface';
 | 
					import { ITranslators } from '../../interfaces/node-api.interface';
 | 
				
			||||||
import { DOCUMENT } from '@angular/common';
 | 
					import { DOCUMENT } from '@angular/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -19,14 +19,16 @@ import { DOCUMENT } from '@angular/common';
 | 
				
			|||||||
export class AboutComponent implements OnInit {
 | 
					export class AboutComponent implements OnInit {
 | 
				
			||||||
  @ViewChild('promoVideo') promoVideo: ElementRef;
 | 
					  @ViewChild('promoVideo') promoVideo: ElementRef;
 | 
				
			||||||
  backendInfo$: Observable<IBackendInfo>;
 | 
					  backendInfo$: Observable<IBackendInfo>;
 | 
				
			||||||
  sponsors$: Observable<any>;
 | 
					 | 
				
			||||||
  translators$: Observable<ITranslators>;
 | 
					 | 
				
			||||||
  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;
 | 
				
			||||||
  showNavigateToSponsor = false;
 | 
					  showNavigateToSponsor = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  profiles$: Observable<any>;
 | 
				
			||||||
 | 
					  translators$: Observable<ITranslators>;
 | 
				
			||||||
 | 
					  allContributors$: Observable<any>;
 | 
				
			||||||
 | 
					  ogs$: Observable<any>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constructor(
 | 
					  constructor(
 | 
				
			||||||
    private websocketService: WebsocketService,
 | 
					    private websocketService: WebsocketService,
 | 
				
			||||||
    private seoService: SeoService,
 | 
					    private seoService: SeoService,
 | 
				
			||||||
@ -43,10 +45,13 @@ export class AboutComponent implements OnInit {
 | 
				
			|||||||
    this.seoService.setTitle($localize`:@@004b222ff9ef9dd4771b777950ca1d0e4cd4348a:About`);
 | 
					    this.seoService.setTitle($localize`:@@004b222ff9ef9dd4771b777950ca1d0e4cd4348a:About`);
 | 
				
			||||||
    this.websocketService.want(['blocks']);
 | 
					    this.websocketService.want(['blocks']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.sponsors$ = this.apiService.getDonation$()
 | 
					    this.profiles$ = this.apiService.getAboutPageProfiles$().pipe(
 | 
				
			||||||
      .pipe(
 | 
					      tap(() => {
 | 
				
			||||||
        tap(() => this.goToAnchor())
 | 
					        this.goToAnchor()
 | 
				
			||||||
      );
 | 
					      }),
 | 
				
			||||||
 | 
					      share(),
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.translators$ = this.apiService.getTranslators$()
 | 
					    this.translators$ = this.apiService.getTranslators$()
 | 
				
			||||||
      .pipe(
 | 
					      .pipe(
 | 
				
			||||||
        map((translators) => {
 | 
					        map((translators) => {
 | 
				
			||||||
@ -59,6 +64,9 @@ export class AboutComponent implements OnInit {
 | 
				
			|||||||
        }),
 | 
					        }),
 | 
				
			||||||
        tap(() => this.goToAnchor())
 | 
					        tap(() => this.goToAnchor())
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.ogs$ = this.apiService.getOgs$();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.allContributors$ = this.apiService.getContributor$().pipe(
 | 
					    this.allContributors$ = this.apiService.getContributor$().pipe(
 | 
				
			||||||
      map((contributors) => {
 | 
					      map((contributors) => {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
 | 
				
			|||||||
@ -92,15 +92,11 @@ export class ApiService {
 | 
				
			|||||||
    return this.httpClient.get<Outspend[][]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/outspends', { params });
 | 
					    return this.httpClient.get<Outspend[][]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/outspends', { params });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  requestDonation$(amount: number, orderId: string): Observable<any> {
 | 
					  getAboutPageProfiles$(): Observable<any[]> {
 | 
				
			||||||
    const params = {
 | 
					    return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/about-page');
 | 
				
			||||||
      amount: amount,
 | 
					 | 
				
			||||||
      orderId: orderId,
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    return this.httpClient.post<any>(this.apiBaseUrl + '/api/v1/donations', params);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getDonation$(): Observable<any[]> {
 | 
					  getOgs$(): Observable<any> {
 | 
				
			||||||
    return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations');
 | 
					    return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -112,10 +108,6 @@ export class ApiService {
 | 
				
			|||||||
    return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/contributors');
 | 
					    return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/contributors');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  checkDonation$(orderId: string): Observable<any[]> {
 | 
					 | 
				
			||||||
    return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations/check?order_id=' + orderId);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  getInitData$(): Observable<WebsocketResponse> {
 | 
					  getInitData$(): Observable<WebsocketResponse> {
 | 
				
			||||||
    return this.httpClient.get<WebsocketResponse>(this.apiBaseUrl + this.apiBasePath + '/api/v1/init-data');
 | 
					    return this.httpClient.get<WebsocketResponse>(this.apiBaseUrl + this.apiBasePath + '/api/v1/init-data');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								frontend/src/resources/profile/unknown.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								frontend/src/resources/profile/unknown.svg
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" data-v-4fa90e7f=""><path d="M14.33 7.17C13.588 7.058 12.807 7 12 7c-4.97 0-9 2.239-9 5 0 1.44 1.096 2.738 2.85 3.65l2.362-2.362a4 4 0 015.076-5.076l1.043-1.043zM11.23 15.926a4 4 0 004.695-4.695l2.648-2.647C20.078 9.478 21 10.68 21 12c0 2.761-4.03 5-9 5-.598 0-1.183-.032-1.749-.094l.98-.98zM17.793 5.207a1 1 0 111.414 1.414L6.48 19.35a1 1 0 11-1.414-1.414L17.793 5.207z"></path></svg>
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 464 B  | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user