Add mining pool logo in the pool stats page
This commit is contained in:
		
							parent
							
								
									e1f3c662b2
								
							
						
					
					
						commit
						9e64592aca
					
				| @ -1,7 +1,8 @@ | |||||||
| <div class="container"> | <div class="container"> | ||||||
| 
 | 
 | ||||||
|   <div *ngIf="poolStats$ | async as poolStats"> |   <div *ngIf="poolStats$ | async as poolStats"> | ||||||
|     <h1> |     <h1 class="m-0"> | ||||||
|  |       <img width="50" src="{{ poolStats['logo'] }}" onError="this.src = './resources/mining-pools/default.svg'" class="mr-3"> | ||||||
|       {{ poolStats.pool.name }} |       {{ poolStats.pool.name }} | ||||||
|     </h1> |     </h1> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -48,6 +48,11 @@ export class PoolComponent implements OnInit { | |||||||
|           } |           } | ||||||
|           return this.apiService.getPoolStats$(this.poolId, params[1] ?? '1w'); |           return this.apiService.getPoolStats$(this.poolId, params[1] ?? '1w'); | ||||||
|         }), |         }), | ||||||
|  |         map((poolStats) => { | ||||||
|  |           return Object.assign({ | ||||||
|  |             logo: `./resources/mining-pools/` + poolStats.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg' | ||||||
|  |           }, poolStats); | ||||||
|  |         }) | ||||||
|       ); |       ); | ||||||
| 
 | 
 | ||||||
|     this.blocks$ = this.fromHeightSubject |     this.blocks$ = this.fromHeightSubject | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user